AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
Public Member Functions | Static Public Member Functions | List of all members
Arg Class Reference

A C++ Interface to the SDS Arg library. More...

#include <arg.h>

Inheritance diagram for Arg:
SdsId

Public Member Functions

 Arg (bool, StatusType *const status, const char *const name="ArgStructure")
 Arg constructor which creates a new SDS structure.
 
 Arg (const SdsId &source, const char *const name, StatusType *const status)
 Constructor which returns an id to a named item of another item.
 
 Arg (const SdsId &source, const long index, StatusType *status)
 Constructor which returns an id to a structured item indexed by position.
 
 Arg (const SdsId &source, const std::string &name, StatusType *const status)
 Constructor which returns an id to a named item of another item.
 
 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.
 
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.
 
template<typename T >
void ArrayAccess (SdsArrayAccessHelper< T > *const data, long *ndims, unsigned long dims[], StatusType *const status)
 Access the data of an SDS array.
 
template<typename T >
void ArrayAccess (SdsArrayAccessHelper< T > *const data, long ndims, unsigned long dims[], StatusType *const status)
 Access the data of an SDS array.
 
template<typename T >
void ArrayAccess (SdsArrayAccessHelper< T > *const data, StatusType *const status)
 Access the data of a single dimensional SDS array item.
 
void CheckItem (SdsCodeType code, StatusType *status, long ndims=-1, long *dims=0)
 Check an item has a required structure.
 
void ClearDelete ()
 Indicate the underlying SDS structure should NOT be deleted when the SdsId object is desroyed.
 
void Code (SdsCodeType *const code, StatusType *const status) const
 Return the code of the SDS item.
 
void Convert (SdsCodeType DstType, void *DstAddr, unsigned long int DstLen, StatusType *status)
 Convert the data in this item to another (normally scalar) type.
 
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.
 
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.
 
void DeepCopy (const SdsId &source, StatusType *const status)
 Replace the item refered to by this object by a deep copy of source.
 
void DeepCopy (const SdsIdType source, StatusType *status)
 Replace the item refered to by this object by a deep copy of source.
 
virtual void Delete (StatusType *const status)
 Delete the SDS item.
 
void Dims (long *const ndims, unsigned long *const dims, StatusType *const status) const
 Return the dimensions of the SDS item.
 
void Export (const unsigned long length, void *const data, StatusType *const status)
 Export the SDS structure into a buffer.
 
void ExportDefined (const unsigned long length, void *const data, StatusType *const status)
 Export the SDS structure into a buffer, defining any undefined data.
 
void Extract (StatusType *const status)
 Extract the SDS structure from its parent.
 
void FillArray (const SdsId &elem, StatusType *const status)
 Fill out the contents of this object, which is a structured array.
 
void Find (const SdsId &source, const char *const name, StatusType *const status)
 Find an SDS object and make available in the current SdsId object.
 
void Flush (StatusType *const status)
 Flush data modified by pointer.
 
void Get (const char *name, bool *value, StatusType *const status) const
 Insert a char * string into 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, 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, 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, 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, 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, long len, char *value, StatusType *const status) const
 Fetch a string value as a char * 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, 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 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, 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, 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, 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, double *value, StatusType *const status) const
 Fetch a double size real 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, 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, 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, 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, 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, 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, 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, unsigned short *value, StatusType *const status) const
 Fetch an unsigned short integer value from a named component of the Arg structure.
 
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 GetExternInfo (void **data, StatusType *const status) const
 Return the address of an external item.
 
void GetExtra (const unsigned long length, char *const extra, StatusType *const status, unsigned long *actlen=0) const
 Get extra data from an SDS item.
 
void GetName (char *const name, StatusType *const status) const
 Return the name of the SDS item.
 
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.
 
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.
 
void Insert (SdsId &to_insert, StatusType *const status)
 Insert an SDS object into this object.
 
void IsExternal (int *const external, StatusType *const status) const
 Determine if the SDS structure is external.
 
void List (FILE *to, StatusType *const status) const
 List the contents of the structure to a file.
 
void List (StatusType *const status) const
 List the contents of the structure to standard output.
 
void New (StatusType *const status, const char *const name="ArgStructure")
 Create a new Arg structure within this object.
 
 operator bool (void) const
 Operator which tests if an item is valid.
 
 operator SdsIdType (void) const
 Operator which returns the underlying SDS id.
 
void Outlive ()
 Force the actual SDS ID to outlive the SdsId variable.
 
void Pointer (void **data, StatusType *const status, unsigned long *length=0)
 Object a pointer to the data area of a primitive SDS item.
 
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, const char *value, StatusType *const status, const std::string &extraData="")
 
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.
 
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.
 
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.
 
void Put (const char *name, const long dim, const unsigned index, const double data, StatusType *const status)
 Insert an 1D double array element.
 
void Put (const char *name, const long dim, const unsigned index, const INT32 data, StatusType *const status)
 Insert an 1D INT32 array element.
 
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.
 
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.
 
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.
 
void Put (const char *name, const std::string &value, StatusType *status, const std::string &extraData="")
 Insert a std::string 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, float value, StatusType *const status)
 Insert an float size real 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, INT64 value, StatusType *const status)
 Insert a 64 bit integer 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, UINT32 value, StatusType *const status)
 Insert an unsigned 32 bit integer 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, 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, bool value, StatusType *const status, const std::string &extraData="")
 Insert a boolean value into a named component of the Arg structure.
 
void Put (const std::string &name, char value, StatusType *const status, const std::string &extraData="")
 Insert a char value into a named component of the Arg structure.
 
void Put (const std::string &name, const std::string &value, StatusType *status, const std::string &extraData="")
 Insert a std::string into a named component of the Arg structure.
 
void Put (const std::string &name, double value, StatusType *const status, const std::string &extraData="")
 Insert an double size real value into a named component of the Arg structure.
 
void Put (const std::string &name, float value, StatusType *const status, const std::string &extraData="")
 Insert an float size real value into a named component of the Arg structure.
 
void Put (const std::string &name, INT32 value, StatusType *const status, const std::string &extraData="")
 Insert a 32 bit integer value into a named component of the Arg structure.
 
void Put (const std::string &name, INT64 value, StatusType *const status, const std::string &extraData="")
 Insert a 64 bit integer value into a named component of the Arg structure.
 
void Put (const std::string &name, short value, StatusType *const status, const std::string &extraData="")
 Insert a short value into a named component of the Arg structure.
 
void Put (const std::string &name, UINT32 value, StatusType *const status, const std::string &extraData="")
 Insert an unsigned 32 bit integer value into a named component of the Arg structure.
 
void Put (const std::string &name, UINT64 value, StatusType *const status, const std::string &extraData="")
 Insert an unsigned 64 bit integer 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 unsigned long length, void *const data, StatusType *const status, const unsigned long offset=0)
 Put data into an SDS item.
 
void PutExtra (const long nextra, const char *const extra, StatusType *const status)
 Put extra data into an SDS item.
 
void PutExtra (const std::string &name, const std::string &extraData, StatusType *const status)
 Put the extra data of a named item.
 
void Rename (const char *const name, StatusType *const status)
 Rename the SDS item.
 
void Resize (const long ndims, const unsigned long *dims, StatusType *const status)
 Change the dimensions of an SDS array.
 
void SetDelete ()
 Indicate the underlying SDS structure should be deleted when the SdsId object is destroyed.
 
void SetFree ()
 Indicate the underlying SDS item should be free-ed when the SdsId object is destroyed.
 
void ShallowCopy (const SdsIdType source, const bool free=false, const bool del=false, const bool readfree=false)
 Shallow copy from SdsIdType.
 
void ShallowCopy (SdsId &source, const bool outlives=true)
 Shallow copy from SdsId.
 
void Size (unsigned long *const bytes, StatusType *const status) const
 Return the size of an SDS structure, as required for exporting.
 
void SizeDefined (unsigned long *const bytes, StatusType *const status) const
 Return the size of an SDS structure, as required for exporting defined.
 
void ToString (int maxlen, int *length, char *string, StatusType *const status)
 Convert the structure to a string.
 
void toString (int maxlen, int *length, char *string, StatusType *const status)
 Convert the structure to a string.
 
void ToString (std::string *s, StatusType *const status, int maxlen=200)
 Convert the structure to a string.
 
void toString (std::string *s, StatusType *const status, int maxlen=200)
 Convert the structure to a string This method attempts to convert the SDS structure maintained by this Arg object into a string representation.
 
void Write (const char *const filename, StatusType *const status) const
 Write the contents of the structure to a file.
 

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.
 

Detailed Description

A C++ Interface to the SDS Arg library.

Arg provides simpler interfaces to constructing, putting and fetching data from simple SDS scalar 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

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