HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Args Class Reference

#include <UT_Args.h>

+ Inheritance diagram for UT_Args:

Public Member Functions

 UT_Args ()
 Default constructor. More...
 
 UT_Args (int argc, const char *const argv[], const char *options)
 
 ~UT_Args ()=default
 Destructor. More...
 
 UT_Args (const UT_Args &)=delete
 
UT_Argsoperator= (const UT_Args &)=delete
 
int argc () const
 
const char * argv (unsigned i) const
 
const char *const * argv () const
 
const char * operator[] (unsigned i) const
 
const char * operator() (unsigned i) const
 
int found (int opt) const
 
const char * argp (int opt, int which=0) const
 
const char * argp2 (int opt) const
 
const char * argp3 (int opt) const
 
fpreal fargp (int opt, int which=0) const
 
fpreal fargp2 (int opt) const
 
fpreal fargp3 (int opt) const
 
int iargp (int opt, int which=0) const
 
int iargp2 (int opt) const
 
int iargp3 (int opt) const
 
void initialize (int argc, const char *const argv[])
 
void initialize (int argc, const UT_StringRef *argv)
 
void initialize (int argc, const UT_StringHolder *argv)
 
void appendArg (const char *arg)
 
void stripOptions (const char *options)
 
int fillCommandLine (UT_WorkBuffer &buf, int first_arg=0, int include_options=1) const
 
void makeCommandLine (UT_String &str, int first_arg=1) const
 
void setArgument (int idx, const char *text)
 Set an argument to a specific value. More...
 
void display ()
 Dump options. More...
 

Detailed Description

Constructor & Destructor Documentation

UT_Args::UT_Args ( )

Default constructor.

UT_Args::UT_Args ( int  argc,
const char *const  argv[],
const char *  options 
)

Convenience constructor. This is equivalent to:

args.stripOptions(options);
UT_Args::~UT_Args ( )
default

Destructor.

UT_Args::UT_Args ( const UT_Args )
delete

Member Function Documentation

void UT_Args::appendArg ( const char *  arg)
const char* UT_Args::argp ( int  opt,
int  which = 0 
) const
inline
const char* UT_Args::argp2 ( int  opt) const
inline

Definition at line 73 of file UT_Args.h.

const char* UT_Args::argp3 ( int  opt) const
inline

Definition at line 77 of file UT_Args.h.

const char* UT_Args::argv ( unsigned  i) const
inline
Examples:
standalone/msgpipe.C.

Definition at line 50 of file UT_Args.h.

const char* const* UT_Args::argv ( ) const
inline

Definition at line 51 of file UT_Args.h.

void UT_Args::display ( )

Dump options.

fpreal UT_Args::fargp ( int  opt,
int  which = 0 
) const
inline
Examples:
RAY/RAY_DemoEdgeDetectFilter.C, and standalone/i3ddsmgen.C.

Definition at line 83 of file UT_Args.h.

fpreal UT_Args::fargp2 ( int  opt) const
inline

Definition at line 89 of file UT_Args.h.

fpreal UT_Args::fargp3 ( int  opt) const
inline

Definition at line 90 of file UT_Args.h.

int UT_Args::fillCommandLine ( UT_WorkBuffer buf,
int  first_arg = 0,
int  include_options = 1 
) const

This method will make a command string out of all the arguments (and options). Arguments will be quoted according to 'csh' syntax.

int UT_Args::iargp ( int  opt,
int  which = 0 
) const
inline
Examples:
packedsphere/packedsphere.C, and standalone/i3ddsmgen.C.

Definition at line 92 of file UT_Args.h.

int UT_Args::iargp2 ( int  opt) const
inline

Definition at line 98 of file UT_Args.h.

int UT_Args::iargp3 ( int  opt) const
inline

Definition at line 99 of file UT_Args.h.

void UT_Args::initialize ( int  argc,
const UT_StringRef argv 
)

Initialize with an array of UT_StringRef objects. This method extracts the c_str() from the UT_StringRef, so the UT_StringRef objects need to remain in scope while the UT_Args is in existence.

void UT_Args::initialize ( int  argc,
const UT_StringHolder argv 
)
void UT_Args::makeCommandLine ( UT_String str,
int  first_arg = 1 
) const

This is a version of fillCommandLine that takes a UT_String for the result.

const char* UT_Args::operator() ( unsigned  i) const
inline

Definition at line 56 of file UT_Args.h.

UT_Args& UT_Args::operator= ( const UT_Args )
delete
const char* UT_Args::operator[] ( unsigned  i) const
inline

Definition at line 52 of file UT_Args.h.

void UT_Args::setArgument ( int  idx,
const char *  text 
)

Set an argument to a specific value.


The documentation for this class was generated from the following file: