Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

OptionVar Class Reference
[Command line options library]

The OptionVar class is an obsolete predecessor of Options. More...

#include <optionvar.h>

Collaboration diagram for OptionVar:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OptionVar ()
 Default constructor.
 OptionVar (const char *n, unsigned int &var)
 Constructor: creates a new option called n and referring to an unsigned int.
 OptionVar (const char *n, int &var)
 Constructor: creates a new option called n and referring to a signed int.
 OptionVar (const char *n, double &var)
 Constructor: creates a new option called n and referring to a double.
 OptionVar (const char *n, char *var)
 Constructor: creates a new option called n and referring to an C string.
 OptionVar (const char *n, bool &var)
 Constructor: creates a new option called n and referring to an boolean.
 ~OptionVar ()
 Destructor.
OptionVartail ()
 Returns a pointer to the last node in the list.
OptionVarGetOptionPtr (const char *n)
 Searches the list for the first node named n and returns its address, or NULL if not found.
OptionVarAddOption (const char *n, unsigned int &var)
 Append a new node to the list, called n and referring to an unsigned int.
OptionVarAddOption (const char *n, int &var)
 Append a new node to the list, called n and referring to a signed int.
OptionVarAddOption (const char *n, double &var)
 Append a new node to the list, called n and referring to a double.
OptionVarAddOption (const char *n, bool &var)
 Append a new node to the list, called n and referring to a boolean.
OptionVarAddOption (const char *n, char *var)
 Append a new node to the list, called n and referring to a C string.
OptionVarSetOption (const char *n, char *var)
 Searches the list for the first node named n and assigns it a value parsed from var. Returns a pointer to the changed node, or NULL if not found.
OptionVarSetOption (const char *n, double var)
 Searches the list for the first node named n, and assigns the value var. Returns a pointer to the changed node, or NULL if not found.
OptionVarParseOption (char *str)
 Parses a C string of the form "name=value", finds a node with the parsed name, assigns it the parsed value, and returns a pointer to it.
int ParseOptionList (char **str, int n)
 Parses an array of n strings, using ParseOption().
int ParseOptionStream (std::istream &is)
 Parses a sequence of "name=value" tokens from an istream, using ParseOption().
void * GetOption (char *n, void *var=NULL, int maxl=0)
 Seaches the list for the first node named n, and returns a void* pointer to the variable to which it refers. Not sure what optional parameters do (6/06).
void Print (std::ostream &os=std::cout, bool chain=0)
 Prints this node to a stream. If chain is set, then all succeeding nodes are printed as well.

Public Attributes

VarType type
 What type of variable this option refers to.
void * ptr
 A pointer to the variable.
char * name
 The variable's name.
OptionVarnext
 Pointer to the next node in the list.

Detailed Description

The OptionVar class is an obsolete predecessor of Options.

To use the OptionVar class, declare a variable of type OptionVar, with an optional constructor.


The documentation for this class was generated from the following files:
Generated on Wed Jun 14 22:25:28 2006 for linalg by  doxygen 1.4.4