DRAMA C++ Intro   Class Hierarchy   Alphabetical List of types   List of Classes   File List   Class Member Index   File Members Index   Related Pages  

Arg Class Reference

#include <arg.h>

Inheritance diagram for Arg:

SdsId List of all members.

Detailed Description

A C++ Interface to the SDS Arg library.

Arg provides simpler interfaces to constructing, putting and fetching data from simple SDS scaler or string items.

Note that if the macro DRAMA_ALLOW_CPP_STDLIB is defined, then it is presume that the C++ standard library is available and relevant methods (such as those which use std::string types) are compiled. Otherwise they are not defined.

See also:
SdsId , SDS Specification , DRAMA C++ interface , DRAMA DITS Specification


Public Methods

 Arg (const SdsIdType item=0, const bool free=false, const bool del=false, const bool readfree=false)
 Arg constructor to access an item created by C language SDS.

 Arg (bool flag, StatusType *const status, const char *const name="ArgStructure")
 Arg constructor which creates a new SDS structure.

void New (StatusType *const status, const char *const name="ArgStructure")
 Create a new Arg structure within this object.

 Arg (const SdsId &source, const char *const name, StatusType *const status)
 Constructor which returns an id to a named item of another item.

void ToString (int maxlen, int *length, char *string, StatusType *const status)
 Convert the structure to a string.

void CheckItem (SdsCodeType code, StatusType *status, long ndims=-1, long *dims=0)
 Check an item has a required structure.

void Put (const char *name, bool value, StatusType *const status)
 Insert a boolean value into a named component of the Arg structure.

void Put (const char *name, char value, StatusType *const status)
 Insert a char value into a named component of the Arg structure.

void Put (const char *name, short value, StatusType *const status)
 Insert a short value into a named component of the Arg structure.

void Put (const char *name, unsigned short value, StatusType *const status)
 Insert an unsigned short value into a named component of the Arg structure.

void Put (const char *name, INT32 value, StatusType *const status)
 Insert a 32 bit integer value into a named component of the Arg structure.

void Put (const char *name, UINT32 value, StatusType *const status)
 Insert an unsigned 32 bit integer into a named component of the Arg structure.

void Put (const char *name, INT64 value, StatusType *const status)
 Insert a 64 bit integer value into a named component of the Arg structure.

void Put (const char *name, UINT64 value, StatusType *const status)
 Insert an unsigned 64 bit integer value into a named component of the Arg structure.

void Put (const char *name, float value, StatusType *const status)
 Insert an float size real value into a named component of the Arg structure.

void Put (const char *name, double value, StatusType *const status)
 Insert an double size real value into a named component of the Arg structure.

void Put (const char *name, const char *value, StatusType *const status)
 Insert a char * string into a named component of the Arg structure.

void Get (const char *name, bool *value, StatusType *const status) const
 Fetch a boolean value from a named component of the Arg structure.

void Get (const char *name, char *value, StatusType *const status) const
 Fetch a char value from a named component of the Arg structure.

void Get (const char *name, short *value, StatusType *const status) const
 Fetch a short integer value from a named component of the Arg structure.

void Get (const char *name, unsigned short *value, StatusType *const status) const
 Fetch an unsigned short integer value from a named component of the Arg structure.

void Get (const char *name, INT32 *value, StatusType *const status) const
 Fetch a 32 bit integer value from a named component of the Arg structure.

void Get (const char *name, UINT32 *value, StatusType *const status) const
 Fetch an unsigned 32 bit integer value from a named component of the Arg structure.

void Get (const char *name, INT64 *value, StatusType *const status) const
 Fetch a 64 bit integer value from a named component of the Arg structure.

void Get (const char *name, UINT64 *value, StatusType *const status) const
 Fetch a unsigned 64 bit integer value from a named component of the Arg structure.

void Get (const char *name, float *value, StatusType *const status) const
 Fetch a float size real value from a named component of the Arg structure.

void Get (const char *name, double *value, StatusType *const status) const
 Fetch a double size real value from a named component of the Arg structure.

void Get (const char *name, long len, char *value, StatusType *const status) const
 Fetch a string value as a char * from a named component of the Arg structure.

void List (StatusType *const status) const
 List the contents of the structure to standard output.

void Get (const unsigned long length, void *const data, StatusType *const status, unsigned long *actlen=0, const unsigned long offset=0) const
 Get data from an SDS item.

void Put (const unsigned long length, void *const data, StatusType *const status, const unsigned long offset=0)
 Put data into an SDS item.

 Arg (const SdsId &source, const std::string &name, StatusType *const status)
 Constructor which returns an id to a named item of another item.

void Put (const std::string &name, bool value, StatusType *const status)
 Insert a boolean value into a named component of the Arg structure.

void Put (const std::string &name, char value, StatusType *const status)
 Insert a char value into a named component of the Arg structure.

void Put (const std::string &name, short value, StatusType *const status)
 Insert a short value into a named component of the Arg structure.

void Put (const std::string &name, unsigned short value, StatusType *const status)
 Insert an unsigned short value into a named component of the Arg structure.

void Put (const std::string &name, INT32 value, StatusType *const status)
 Insert a 32 bit integer value into a named component of the Arg structure.

void Put (const std::string &name, UINT32 value, StatusType *const status)
 Insert an unsigned 32 bit integer value into a named component of the Arg structure.

void Put (const std::string &name, INT64 value, StatusType *const status)
 Insert a 64 bit integer value into a named component of the Arg structure.

void Put (const std::string &name, UINT64 value, StatusType *const status)
 Insert an unsigned 64 bit integer value into a named component of the Arg structure.

void Put (const std::string &name, float value, StatusType *const status)
 Insert an float size real value into a named component of the Arg structure.

void Put (const std::string &name, double value, StatusType *const status)
 Insert an double size real value into a named component of the Arg structure.

void Put (const char *name, const std::string &value, StatusType *status)
 Insert a std::string into a named component of the Arg structure.

void Put (const std::string &name, const std::string &value, StatusType *status)
 Insert a std::string into a named component of the Arg structure.

void Get (const std::string &name, bool *value, StatusType *const status) const
 Fetch a boolean value from a named component of the Arg structure.

void Get (const std::string &name, char *value, StatusType *const status) const
 Fetch a char value from a named component of the Arg structure.

void Get (const std::string &name, short *value, StatusType *const status) const
 Fetch a short integer value from a named component of the Arg structure.

void Get (const std::string &name, unsigned short *value, StatusType *const status) const
 Fetch an unsigned short integer value from a named component of the Arg structure.

void Get (const std::string &name, INT32 *value, StatusType *const status) const
 Fetch a 32 bit integer value from a named component of the Arg structure.

void Get (const std::string &name, UINT32 *value, StatusType *const status) const
 Fetch a 32 bit unsigned integer value from a named component of the Arg structure.

void Get (const std::string &name, INT64 *value, StatusType *const status) const
 Fetch a 64 bit integer value from a named component of the Arg structure.

void Get (const std::string &name, UINT64 *value, StatusType *const status) const
 Fetch a unsigned 64 bit integer value from a named component of the Arg structure.

void Get (const std::string &name, float *value, StatusType *const status) const
 Fetch a float size real value from a named component of the Arg structure.

void Get (const std::string &name, double *value, StatusType *const status) const
 Fetch a double size real value from a named component of the Arg structure.

void Get (const char *name, std::string *value, StatusType *status, int buflen=100) const
 Fetch a string value as a std::string from a named component of the Arg structure.

void Get (const std::string &name, std::string *value, StatusType *status, int buflen=100) const
 Fetch a string value as a std::string from a named component of the Arg structure.


Static Public Methods

void List (const SdsId &id, unsigned buflen, char *buffer, ArgListFuncType func, void *client_data, StatusType *ARGCONST status)
 List an SDS structure through a print function.


Constructor & Destructor Documentation

Arg::Arg const SdsIdType    item = 0,
const bool    free = false,
const bool    del = false,
const bool    readfree = false
[inline]
 

Arg constructor to access an item created by C language SDS.

This Arg constructor that takes an existing SDS id (C style) and creates an SdsId class object which referees to it. You must explictly specify if the item is to be freed and deleted when the object's destructor is invoked, and what you do depends on when what other code may do with item. del and readfree are mutually exclusive.

Parameters:
item  The SdsIdType of the item. If 0 (default), a SdsId object which does not refer to any SDS item is created. This is normally only used when we want an argument to pass (by pointer) to a function which will use ShallowCopy() or DeepCopy() to set the ID or if you wish to use the New() method to create a new method later.
free  Invoke SdsFreeId() on the ID when the object is destroyed. Default is false.
del  Invoke SdsDelete() on the ID when the object is destroyed. The default is false.
readfree  Invoke SdsReadFree() on the ID when the object is destroyed. The default is false.

Arg::Arg bool    flag,
StatusType *const    status,
const char *const    name = "ArgStructure"
[inline]
 

Arg constructor which creates a new SDS structure.

This Arg contructor creates a new top level SDS item.

The first argument is just used to make this constructors argument list unique in all cases.

See also:
ArgNew()
Parameters:
flag  Ignored, but used to distingish this constructor from other contructors.
status  Inherited status.
name  The name for the structure. The default is what is normally supplied by the ArgNew() function, but any name acceptable to SDS can be specified.

Arg::Arg const SdsId   source,
const char *const    name,
StatusType *const    status
[inline]
 

Constructor which returns an id to a named item of another item.

This constructor searches an existing SDS item for a item with a specified name and creates a reference to it.

See also:
SdsFind() , ArgFind()
Parameters:
source  The SDS item to find name within.
name  The name of the SDS item to find.
status  Inherited status.

Arg::Arg const SdsId   source,
const std::string &    name,
StatusType *const    status
[inline]
 

Constructor which returns an id to a named item of another item.

This constructor searches an existing SDS item for a item with a specified name and creates a reference to it.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
SdsFind() , ArgFind()
Parameters:
source  The SDS item to find name within.
name  The name of the SDS item to find.
status  Inherited status.


Member Function Documentation

void Arg::CheckItem SdsCodeType    code,
StatusType *    status,
long    ndims = -1,
long *    dims = 0
[inline]
 

Check an item has a required structure.

A common requirement for the user of the SDS library is to check that a specified SDS item has the right format - type code, number of dimensions and dimensions. This utility function implements such a check.

See also:
ArgCheckItem()
Parameters:
code  SDS Code we expect. The normal SDS code values, or ARG_STRING, in which case we mean SDS_CHAR but the ndims value is bumped by 1 automatically. If specified as -1, then the code is ignored.
status  Inherited status.
ndims  The expected number of dimensions. 0 to SDS_C_MAXARRAYDIMS (7) or a maximum one less then this if code=ARG_STIRNG. If specified as -1, then don't check ndims.
dims  The expected dimensions. Only used if ndims>0 or code=ARG_STRING. Only ndims values are used (or ndims+1 if code=ARG_STRING). If the value is negative or zero, the value is ignored, otherwise they must match. Note - long, not the unsigned long that SDS dimension arrays noramlly are. A null pointer can be supplied, which is equivalent of an array of -1 values.

void Arg::Get const std::string &    name,
std::string *    value,
StatusType *    status,
int    buflen = 100
const [inline]
 

Fetch a string value as a std::string from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it a std::string value, if possible.

Note that this does not work for non-char items array items which require more then buflen bytes - since it is not possible to ensure we resize the string appropiately.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetString()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.
buflen  The number of bytes to allow in the string for the result. Only used if the underlying value is not an array of SDS_CHAR

void Arg::Get const char *    name,
std::string *    value,
StatusType *    status,
int    buflen = 100
const [inline]
 

Fetch a string value as a std::string from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it a std::string value, if possible.

Note that this does not work for non-char items array items which require more then buflen bytes - since it is not possible to ensure we resize the string appropiately.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetString()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.
buflen  The number of bytes to allow in the string for the result. Only used if the underlying value is not an array of SDS_CHAR

void Arg::Get const std::string &    name,
double *    value,
StatusType *const    status
const [inline]
 

Fetch a double size real value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a double, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetd()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
float *    value,
StatusType *const    status
const [inline]
 

Fetch a float size real value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a float, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetf()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
UINT64 *    value,
StatusType *const    status
const [inline]
 

Fetch a unsigned 64 bit integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a unsigned 64 bit integer, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetu64()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
INT64 *    value,
StatusType *const    status
const [inline]
 

Fetch a 64 bit integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a 64 bit integer, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGeti64()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
UINT32 *    value,
StatusType *const    status
const [inline]
 

Fetch a 32 bit unsigned integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to an unsigned long integer, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetu()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
INT32 *    value,
StatusType *const    status
const [inline]
 

Fetch a 32 bit integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a long integer, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGeti()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
unsigned short *    value,
StatusType *const    status
const [inline]
 

Fetch an unsigned short integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to an unsigned short integer, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetus()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
short *    value,
StatusType *const    status
const [inline]
 

Fetch a short integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a short integer, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGets()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
char *    value,
StatusType *const    status
const [inline]
 

Fetch a char value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a char, if possible.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetc()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const std::string &    name,
bool *    value,
StatusType *const    status
const [inline]
 

Fetch a boolean value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a bool, if possible.

Note that SDS does not directly support boolean values, so an integer representation is used internally and converted to bool.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgGetus()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const unsigned long    length,
void *const    data,
StatusType *const    status,
unsigned long *    actlen = 0,
const unsigned long    offset = 0
const [inline, virtual]
 

Get data from an SDS item.

This method accesses the data from an SDS item. The data is copied into the specified buffer.

Note that data from nested structures is also copied. Please see the SDS manual for more details on Get operations.

See also:
SdsGet() , SdsId::Pointer , SdsId::Put , SdsPut()
Parameters:
length  The amount of data to fetch.
data  The buffer to put the data info, must of of size length or greater.
status  Inherited status.
actlen  The actual amount of data retrived is written here. If not supplied, this information is not returned.
offset  An offset into the SDS structure to start fetch from, in bytes

Reimplemented from SdsId.

void Arg::Get const char *    name,
long    len,
char *    value,
StatusType *const    status
const [inline]
 

Fetch a string value as a char * from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it a char * value, if possible.

See also:
ArgGetString()
Parameters:
name  The name of the item within the SDS structure.
len  The length available in value, in bytes.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
double *    value,
StatusType *const    status
const [inline]
 

Fetch a double size real value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a double, if possible.

See also:
ArgGetd()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
float *    value,
StatusType *const    status
const [inline]
 

Fetch a float size real value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a float, if possible.

See also:
ArgGetf()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
UINT64 *    value,
StatusType *const    status
const [inline]
 

Fetch a unsigned 64 bit integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a unsigned 64 bit integer, if possible.

See also:
ArgGetu64()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
INT64 *    value,
StatusType *const    status
const [inline]
 

Fetch a 64 bit integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a 64 bit integer, if possible.

See also:
ArgGeti64()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
UINT32 *    value,
StatusType *const    status
const [inline]
 

Fetch an unsigned 32 bit integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to an unsigned long integer, if possible.

See also:
ArgGetu()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
INT32 *    value,
StatusType *const    status
const [inline]
 

Fetch a 32 bit integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a long integer, if possible.

See also:
ArgGeti()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
unsigned short *    value,
StatusType *const    status
const [inline]
 

Fetch an unsigned short integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to an unsigned short integer, if possible.

See also:
ArgGetus()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
short *    value,
StatusType *const    status
const [inline]
 

Fetch a short integer value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a short integer, if possible.

See also:
ArgGets()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
char *    value,
StatusType *const    status
const [inline]
 

Fetch a char value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a char, if possible.

See also:
ArgGetc()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::Get const char *    name,
bool *    value,
StatusType *const    status
const [inline]
 

Fetch a boolean value from a named component of the Arg structure.

If the named item exists within the ARG structure then fetch its value and convert it to a bool, if possible.

Note that SDS does not directly support boolean values, so an integer representation is used internally and converted to bool.

See also:
ArgGetus()
Parameters:
name  The name of the item within the SDS structure.
value  The value returned is written here.
status  Inherited status.

void Arg::List StatusType *const    status const [inline]
 

List the contents of the structure to standard output.

See also:
SdsList()
Parameters:
status  Inherited status.

Reimplemented from SdsId.

void Arg::List const SdsId   id,
unsigned    buflen,
char *    buffer,
ArgListFuncType    func,
void *    client_data,
StatusType *ARGCONST    status
[inline, static]
 

List an SDS structure through a print function.

This static List function allows an SdsId/Arg structure to be listed with a printing function. It provides appropiate access to the ArgSdsList() function

Remarks:
Should use a printing object rather then a printing function, which would probably improve the format significantly.
See also:
ArgSdsList()
Parameters:
id  The SdsId item to be printed.
buflen  The length of the supplied buffer.
buffer  The buffer to format into.
func  The printing function.
client_data  Passed through to the printing function.
status  Inherited status.

void Arg::New StatusType *const    status,
const char *const    name = "ArgStructure"
[inline]
 

Create a new Arg structure within this object.

This method destorys the existing SDS object referred to by this object and creates a new one.

See also:
ArgNew()
Parameters:
status  Inherited status.
name  The name for the structure. The default is what is normally supplied by the ArgNew() function, but any name acceptable to SDS can be specified.

void Arg::Put const std::string &    name,
const std::string &    value,
StatusType *    status
[inline]
 

Insert a std::string into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (array of SDS type SDS_CHAR) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutString()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted. The null terminated string extracted form this is what is inserted.
status  Inherited status.

void Arg::Put const char *    name,
const std::string &    value,
StatusType *    status
[inline]
 

Insert a std::string into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (array of SDS type SDS_CHAR) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutString()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted. The null terminated string extracted form this is what is inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
double    value,
StatusType *const    status
[inline]
 

Insert an double size real value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_DOUBLE) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutd()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
float    value,
StatusType *const    status
[inline]
 

Insert an float size real value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_FLOAT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutf()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
UINT64    value,
StatusType *const    status
[inline]
 

Insert an unsigned 64 bit integer value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_UINT64) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutu64()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
INT64    value,
StatusType *const    status
[inline]
 

Insert a 64 bit integer value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_INT64) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPuti64()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
UINT32    value,
StatusType *const    status
[inline]
 

Insert an unsigned 32 bit integer value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_UINT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutu()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
INT32    value,
StatusType *const    status
[inline]
 

Insert a 32 bit integer value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_INT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPuti()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
unsigned short    value,
StatusType *const    status
[inline]
 

Insert an unsigned short value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_USHORT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutus()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
short    value,
StatusType *const    status
[inline]
 

Insert a short value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_SHORT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPuts()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
char    value,
StatusType *const    status
[inline]
 

Insert a char value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_CHAR) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutc()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const std::string &    name,
bool    value,
StatusType *const    status
[inline]
 

Insert a boolean value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_USHORT) and the specified value inserted (after conversion to unsigned short). If the name item already exists, then the value is converted to that type (if possible) and inserted.

Note that SDS does not directly support boolean values, so an integer representation is used.

Remarks:
Only available if the marcro DRAMA_ALLOW_CPP_STDLIB is defined.
See also:
ArgPutus()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const unsigned long    length,
void *const    data,
StatusType *const    status,
const unsigned long    offset = 0
[inline, virtual]
 

Put data into an SDS item.

This method put the data into an SDS item. The data is copied into the specified buffer.

Note that data from nested structures is also copied. Please see the SDS manual for more details on Put operations.

See also:
SdsPut() , SdsId::Get , SdsId::Pointer , SdsGet()
Parameters:
length  The amount of data to put.
data  The buffer of the data, must of of size length or greater.
status  Inherited status.
offset  An offset into the SDS structure to start fetch from, in bytes

Reimplemented from SdsId.

void Arg::Put const char *    name,
const char *    value,
StatusType *const    status
[inline]
 

Insert a char * string into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (array of SDS type SDS_CHAR) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPutString()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted. Must be a null terminated string. Note that the null termination is considered part of the string to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
double    value,
StatusType *const    status
[inline]
 

Insert an double size real value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_DOUBLE) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPutd()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
float    value,
StatusType *const    status
[inline]
 

Insert an float size real value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_FLOAT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPutf()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
UINT64    value,
StatusType *const    status
[inline]
 

Insert an unsigned 64 bit integer value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_UINT64) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPutui64()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
INT64    value,
StatusType *const    status
[inline]
 

Insert a 64 bit integer value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_INT64) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPuti64()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
UINT32    value,
StatusType *const    status
[inline]
 

Insert an unsigned 32 bit integer into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_UINT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPutu()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
INT32    value,
StatusType *const    status
[inline]
 

Insert a 32 bit integer value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_INT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPuti()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
unsigned short    value,
StatusType *const    status
[inline]
 

Insert an unsigned short value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_USHORT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPutus()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
short    value,
StatusType *const    status
[inline]
 

Insert a short value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_SHORT) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPuts()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
char    value,
StatusType *const    status
[inline]
 

Insert a char value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_CHAR) and the specified value inserted. If the name item already exists, then the value is converted to that type (if possible) and inserted.

See also:
ArgPutc()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::Put const char *    name,
bool    value,
StatusType *const    status
[inline]
 

Insert a boolean value into a named component of the Arg structure.

The named item is created in the current structure if it does not already exist (of SDS type SDS_USHORT) and the specified value inserted (after conversion to unsigned short). If the name item already exists, then the value is converted to that type (if possible) and inserted.

Note that SDS does not directly support boolean values, so an integer representation is used.

See also:
ArgPutus()
Parameters:
name  The name of the item within the SDS structure.
value  The value to be inserted.
status  Inherited status.

void Arg::ToString int    maxlen,
int *    length,
char *    string,
StatusType *const    status
[inline]
 

Convert the structure to a string.

This method attempts to convert the SDS structure maintained by this Arg object into a string representation.

See also:
ArgToString() , Arg::List
Parameters:
maxlen  The maximum amount of space in the output string.
length  The length of the output string is returned here.
string  The buffer to write the structure too.
status  Inherited status.


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

Click here for the DRAMA home page and here for the AAO home page.

For more information, contact tjf@aaoepp.aao.gov.au 

Generated on Tue Nov 3 09:09:56 2009 for AAO DRAMA C++ Interfaces by doxygen 1.2.18