NAME
ACE_ARGV -
Transforms a string buf into an argv style vector of
strings or an argv style vector of string buf, performing
environment variable substitutions if necessary.
SYNOPSIS
#include <ace/ARGV.h>
class ACE_ARGV
{
public:
ACE_ARGV (char buf[], int substitute_env_args = 1);
ACE_ARGV (char *argv[], int substitute_env_args = 1);
~ACE_ARGV (void);
char *operator[] (int index) const;
char **argv (void) const;
size_t argc (void) const;
char *buf (void) const;
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
private:
size_t argc_;
char **argv_;
char *buf_;
};
Initialization and termination.
ACE_ARGV (char buf[], int substitute_env_args = 1);
Converts buf into an argv-style vector of strings. If
substitute_env_args is enabled then we'll substitute the
environment variables for each $ENV encountered in the string.
ACE_ARGV (char *argv[], int substitute_env_args = 1);
Converts argv into a linear string. If substitute_env_args
is enabled then we'll substitute the environment variables for
each $ENV encountered in the string.
~ACE_ARGV (void);
Accessor arguments.
char *operator[] (int index) const;
Returns the indexth string in the ARGV array.
char **argv (void) const;
Returns the argv array. Caller should not delete this memory
since the ARGV destructor will delete it.
size_t argc (void) const;
char *buf (void) const;
Returns the buf. Caller should not delete this memory since
the ARGV destructor will delete it.
void dump (void) const;
Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
AUTHOR
Doug Schmidt
LIBRARY
ace