A C++ Interface to the SDS Arg library. More...
#include <arg.h>
Public Member Functions | |
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. More... | |
Arg (bool, StatusType *const status, const char *const name="ArgStructure") | |
Arg constructor which creates a new SDS structure. More... | |
void | New (StatusType *const status, const char *const name="ArgStructure") |
Create a new Arg structure within this object. More... | |
Arg (const SdsId &source, const char *const name, StatusType *const status) | |
Constructor which returns an id to a named item of another item. More... | |
void | ToString (int maxlen, int *length, char *string, StatusType *const status) |
Convert the structure to a string. More... | |
void | CheckItem (SdsCodeType code, StatusType *status, long ndims=-1, long *dims=0) |
Check an item has a required structure. More... | |
void | Put (const char *name, bool value, StatusType *const status) |
Insert a boolean value into a named component of the Arg structure. More... | |
void | Put (const char *name, char value, StatusType *const status) |
Insert a char value into a named component of the Arg structure. More... | |
void | Put (const char *name, short value, StatusType *const status) |
Insert a short value into a named component of the Arg structure. More... | |
void | Put (const char *name, unsigned short value, StatusType *const status) |
Insert an unsigned short value into a named component of the Arg structure. More... | |
void | Put (const char *name, INT32 value, StatusType *const status) |
Insert a 32 bit integer value into a named component of the Arg structure. More... | |
void | Put (const char *name, UINT32 value, StatusType *const status) |
Insert an unsigned 32 bit integer into a named component of the Arg structure. More... | |
void | Put (const char *name, INT64 value, StatusType *const status) |
Insert a 64 bit integer value into a named component of the Arg structure. More... | |
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. More... | |
void | Put (const char *name, float value, StatusType *const status) |
Insert an float size real value into a named component of the Arg structure. More... | |
void | Put (const char *name, double value, StatusType *const status) |
Insert an double size real value into a named component of the Arg structure. More... | |
void | Put (const char *name, const char *value, StatusType *const status) |
Insert a char * string into a named component of the Arg structure. More... | |
void | Get (const char *name, bool *value, StatusType *const status) const |
Fetch a boolean value from a named component of the Arg structure. More... | |
void | Put (const char *name, const long dim, const double data[], StatusType *const status) |
Insert an array of double into a named component of the Arg structure. More... | |
void | Put (const char *name, const long dim, const unsigned index, const double data, StatusType *const status) |
Insert an 1D double array element. More... | |
void | Put (const char *name, const long dim, const INT32 data[], StatusType *const status) |
Insert an array of INT32 into a named component of the Arg structure. More... | |
void | Put (const char *name, const long dim, const unsigned index, const INT32 data, StatusType *const status) |
Insert an 1D INT32 array element. More... | |
void | Put (const char *name, const long dim, const unsigned char data[], StatusType *const status) |
Insert an array of unsigned char into a named component of the Arg structure. More... | |
void | Put (const char *name, const long dim, const unsigned index, const unsigned char data, StatusType *const status) |
Insert an 1D unsigned char array element. More... | |
void | Put (const char *name, const long slen, const long dim, const char *data[], StatusType *const status) |
Insert an array of string into a named component of the Arg structure. More... | |
void | Put (const char *name, const long slen, const long dim, const unsigned index, const char *data, StatusType *const status) |
Insert an 1D string array element. More... | |
void | Get (const char *name, char *value, StatusType *const status) const |
Fetch a char value from a named component of the Arg structure. More... | |
void | Get (const char *name, short *value, StatusType *const status) const |
Fetch a short integer value from a named component of the Arg structure. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | List (StatusType *const status) const |
List the contents of the structure to standard output. More... | |
void | List (FILE *to, StatusType *const status) const |
List the contents of the structure to a file. More... | |
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. More... | |
void | Put (const unsigned long length, void *const data, StatusType *const status, const unsigned long offset=0) |
Put data into an SDS item. More... | |
Arg (const SdsId &source, const std::string &name, StatusType *const status) | |
Constructor which returns an id to a named item of another item. More... | |
void | Put (const std::string &name, bool value, StatusType *const status) |
Insert a boolean value into a named component of the Arg structure. More... | |
void | Put (const std::string &name, char value, StatusType *const status) |
Insert a char value into a named component of the Arg structure. More... | |
void | Put (const std::string &name, short value, StatusType *const status) |
Insert a short value into a named component of the Arg structure. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | Put (const char *name, const std::string &value, StatusType *status) |
Insert a std::string into a named component of the Arg structure. More... | |
void | Put (const std::string &name, const std::string &value, StatusType *status) |
Insert a std::string into a named component of the Arg structure. More... | |
void | Get (const std::string &name, bool *value, StatusType *const status) const |
Fetch a boolean value from a named component of the Arg structure. More... | |
void | Get (const std::string &name, char *value, StatusType *const status) const |
Fetch a char value from a named component of the Arg structure. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
![]() | |
SdsId (const SdsIdType item=0, const bool free=false, const bool del=false, const bool readfree=false) | |
Construct an SdsId item from an existing C language SDS id. More... | |
SdsId (void *const data, StatusType *const status, const bool import=false) | |
Constructor that accesses an exported SDS structure in a byte stream. More... | |
SdsId (const void *const data, StatusType *const status) | |
Constructor that imports a previously exported SDS structure from a const byte stream. More... | |
SdsId (const char *const filename, StatusType *const status) | |
Constructor which creates an SDS Id after reading a structure from a file. More... | |
SdsId (const SdsId &parent_id, const char *const name, const SdsCodeType code, StatusType *const status, const long nextra=0, const char *const extra=0) | |
Constructor which creates a new (non-array) child item. More... | |
SdsId (const char *const name, const SdsCodeType code, StatusType *const status, const long nextra=0, const char *const extra=0) | |
Constructor which creates a new (non-array) top-level item. More... | |
SdsId (const SdsId &parent_id, const char *const name, const SdsCodeType code, const long ndims, const unsigned long *dims, StatusType *const status, const long nextra=0, const char *const extra=0) | |
Constructor which creates a new array child item. More... | |
SdsId (const char *const name, const SdsCodeType code, const long ndims, const unsigned long *dims, StatusType *const status, const long nextra=0, const char *const extra=0) | |
Constructor which creates a new array top-level item. More... | |
SdsId (const SdsId &array_id, const long nindicies, const unsigned long *const indicies, StatusType *const status) | |
Constructor that returns a cell of an existing array id. More... | |
SdsId (const SdsId &source, StatusType *const status) | |
SdsId Copy constructor. More... | |
SdsId (const SdsId &source, const char *const name, StatusType *const status) | |
Constructor which returns a reference to a named item. More... | |
SdsId (const SdsId &source, const long index, StatusType *const status) | |
Constructor which returns an id to a structured item indexed by position. More... | |
virtual | ~SdsId () |
SdsId Destructor. More... | |
void | SetFree () |
Indicate the underlying SDS item should be free-ed when the SdsId object is destroyed. More... | |
void | SetDelete () |
Indicate the underlying SDS structure should be deleted when the SdsId object is destroyed. More... | |
void | ClearDelete () |
Indicate the underlying SDS structure should NOT be deleted when the SdsId object is desroyed. More... | |
void | Outlive () |
Force the actual SDS ID to outlive the SdsId variable. More... | |
virtual void | Delete (StatusType *const status) |
Delete the SDS item. More... | |
void | Export (const unsigned long length, void *const data, StatusType *const status) |
Export the SDS structure into a buffer. More... | |
void | ExportDefined (const unsigned long length, void *const data, StatusType *const status) |
Export the SDS structure into a buffer, defining any undefined data. More... | |
void | Extract (StatusType *const status) |
Extract the SDS structure from its parent. More... | |
void | Flush (StatusType *const status) |
Flush data modified by pointer. More... | |
void | GetExtra (const unsigned long length, char *const extra, StatusType *const status, unsigned long *actlen=0) const |
Get extra data from an SDS item. More... | |
void | Info (char *const name, SdsCodeType *const code, long *const ndims, unsigned long *const dims, StatusType *const status) const |
Return information about an SDS item. More... | |
void | GetName (char *const name, StatusType *const status) const |
Return the name of the SDS item. More... | |
void | Code (SdsCodeType *const code, StatusType *const status) const |
Return the code of the SDS item. More... | |
void | Dims (long *const ndims, unsigned long *const dims, StatusType *const status) const |
Return the dimensions of the SDS item. More... | |
void | Insert (SdsId &to_insert, StatusType *const status) |
Insert an SDS object into this object. More... | |
void | Insert (SdsId &to_insert, const long ndims, const unsigned long *const dims, StatusType *const status) |
Insert an SDS object into this object, which is a structured array. More... | |
void | FillArray (const SdsId &elem, StatusType *const status) |
Fill out the contents of this object, which is a structured array. More... | |
void | Pointer (void **data, StatusType *const status, unsigned long *length=0) |
Object a pointer to the data area of a primitive SDS item. More... | |
void | PutExtra (const long nextra, const char *const extra, StatusType *const status) |
Put extra data into an SDS item. More... | |
void | Rename (const char *const name, StatusType *const status) |
Rename the SDS item. More... | |
void | Resize (const long ndims, const unsigned long *dims, StatusType *const status) |
Change the dimensions of an SDS array. More... | |
void | Size (unsigned long *const bytes, StatusType *const status) const |
Return the size of an SDS structure, as required for exporting. More... | |
void | SizeDefined (unsigned long *const bytes, StatusType *const status) const |
Return the size of an SDS structure, as required for exporting defined. More... | |
void | List (StatusType *const status) const |
List the contents of the structure to standard output. More... | |
void | List (FILE *to, StatusType *const status) const |
List the contents of the structure to a C file. More... | |
void | Write (const char *const filename, StatusType *const status) const |
Write the contents of the structure to a file. More... | |
void | IsExternal (int *const external, StatusType *const status) const |
Determine if the SDS structure is external. More... | |
void | GetExternInfo (void **data, StatusType *const status) const |
Return the address of an external item. More... | |
operator SdsIdType (void) const | |
Operator which returns the underlying SDS id. More... | |
operator bool (void) const | |
Operator which tests if an item is valid. More... | |
SdsIdType | COut (const bool outlives, bool *const free=0, bool *const del=0, bool *const readfree=0) |
Return this item as an SdsIdType for return to C code. More... | |
void | COut (const bool outlives, SdsIdType *item, bool *const free=0, bool *const del=0, bool *const readfree=0) |
Return this item as an SdsIdType for return to C code. More... | |
void | Find (const SdsId &source, const char *const name, StatusType *const status) |
Find an SDS object and make available in the current SdsId object. More... | |
void | ShallowCopy (SdsId &source, const bool outlives=true) |
Shallow copy from SdsId. More... | |
void | DeepCopy (const SdsId &source, StatusType *const status) |
Replace the item refered to by this object by a deep copy of source. More... | |
void | ShallowCopy (const SdsIdType source, const bool free=false, const bool del=false, const bool readfree=false) |
Shallow copy from SdsIdType. More... | |
void | DeepCopy (const SdsIdType source, StatusType *status) |
Replace the item refered to by this object by a deep copy of source. More... | |
template<typename T > | |
void | ArrayAccess (SdsArrayAccessHelper< T > *const data, StatusType *const status) |
Access the data of a single dimensional SDS array item. More... | |
template<typename T > | |
void | ArrayAccess (const unsigned long expitems, SdsArrayAccessHelper< T > *const data, StatusType *const status) |
Access the data of a single dimensional SDS array. More... | |
template<typename T > | |
void | ArrayAccess (SdsArrayAccessHelper< T > *const data, long ndims, unsigned long dims[], StatusType *const status) |
Access the data of an SDS array. More... | |
template<typename T > | |
void | ArrayAccess (SdsArrayAccessHelper< T > *const data, long *ndims, unsigned long dims[], StatusType *const status) |
Access the data of an SDS array. More... | |
Static Public Member Functions | |
static 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. More... | |
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.
|
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.
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. |
|
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.
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. |
|
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.
source | The SDS item to find name within. |
name | The name of the SDS item to find. |
status | Inherited status. |
References SdsId::ShallowCopy().
|
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.
source | The SDS item to find name within. |
name | The name of the SDS item to find. |
status | Inherited status. |
References SdsId::ShallowCopy().
|
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.
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. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
Referenced by Get().
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
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. |
|
inlinevirtual |
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.
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.
References SdsId::Get().
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
References Get().
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
References Get().
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
name | The name of the item within the SDS structure. |
value | The value returned is written here. |
status | Inherited status. |
|
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.
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 |
References SdsId::Info().
|
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.
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 |
References Get().
|
inlinestatic |
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
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. |
|
inline |
List the contents of the structure to standard output.
status | Inherited status. |
|
inline |
|
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.
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. |
References SdsId::ShallowCopy().
|
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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited status. |
Referenced by Put().
|
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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
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. |
|
inline |
Insert an array of double 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_DOUBLE) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements |
data | The data to be inserted. |
status | Inherited status. |
|
inline |
Insert an 1D double array element.
The named item is created in the current structure if it does not already exist (array of SDS type SDS_DOUBLE) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements. If zero, use presume index+1. |
index | The index to the item within the SDS structure. |
data | The data item to be inserted. |
status | Inherited status. |
|
inline |
Insert an array of INT32 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_INT) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements |
data | The data to be inserted. |
status | Inherited status. |
|
inline |
Insert an 1D INT32 array element.
The named item is created in the current structure if it does not already exist (array of SDS type SDS_INT) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements. If zero, use presume index+1. |
index | The index to the item within the SDS structure. |
data | The data item to be inserted. |
status | Inherited status. |
|
inline |
Insert an array of unsigned char 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_UBYTE) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements |
data | The data to be inserted. |
status | Inherited status. |
|
inline |
Insert an 1D unsigned char array element.
The named item is created in the current structure if it does not already exist (array of SDS type SDS_UBYTE) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements. If zero, use presume index+1. |
index | The index to the item within the SDS structure. |
data | The data item to be inserted. |
status | Inherited status. |
|
inline |
Insert an array of 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 strings) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
slen | Number of items in each string, including null terminator. If array does not already exist, it will be created with this number of characters in each string. If it does exist, it must have at least this number of characters in each string. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements |
data | The data to be inserted. |
status | Inherited status. |
|
inline |
Insert an 1D string array element.
The named item is created in the current structure if it does not already exist (array of strings) and the specified value inserted.
This does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type.
name | The name of the item within the SDS structure. |
slen | Number of items in each string, including null terminator. If array does not already exist, it will be created with this number of characters in each string. If it does exist, it must have at least this number of characters in each string. If zero, use length of data including null terminator. |
dim | Number of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements. If zero, use presume index+1. |
index | The index to the item within the SDS structure. |
data | The data item to be inserted. |
status | Inherited status. |
|
inlinevirtual |
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.
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.
References SdsId::Put().
|
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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
name | The name of the item within the SDS structure. |
value | The value to be inserted. |
status | Inherited 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.
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. |
|
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.
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. |
References Put().
|
inline |
Convert the structure to a string.
This method attempts to convert the SDS structure maintained by this Arg object into a string representation.
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. |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aao.gov.au Generated on Mon Feb 22 2016 13:58:31 for AAO DRAMA C++ Interfaces by