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

arg.h
1 /*
2  * Name: filter.m4
3  *
4  * Description:
5  * DOXYGEN Input file filter for DRAMA source files.
6  *
7  * This file must be complatible with both Solaris and GNU m4. All
8  * unused macros are deleted and this comment must end up as a C/C++
9  * compatible comment which is not picked up by DOXYGEN.
10  *
11  * Synopsis:
12  * DCF(func) => Produces a link to a DRAMA C source file func.html
13  * in ../routines.
14  * DDL(link,text) => Produce a link to ../link.html, specified link text.
15  *
16  * Language: m4 macro.
17  *
18  * Author: Tony Farrell, AAO.
19  *
20  * "@(#) $Id: ACMM:DramaHtml/filter.m4,v 3.29+ 02-May-2014 10:40:01+10 tjf $"
21  *
22  * History:
23  * 10-Nov-2004 - TJF - Original Version.
24  */
25 
26 
27 
28 #ifndef ARGINC
29 #define ARGINC
30 /*
31  * @(#) $Id: ACMM:sds/arg.h,v 3.82 23-Dec-2015 08:24:09+11 tjf $
32  */
33 /*
34  * This file now uses DOXYGEN comments to generate the C++ web pages.
35  * m4 macros of the form @htmlonly <a href="../routines/function.html">function()</a>@endhtmlonly are used in the comments
36  * to refer to DRAMA C function documention (see DramaHtml/Makefile,
37  * DramaHtml/doxygen.config and DramaHtml/filter.m4 for detials)
38  */
39 
40 #ifdef __cplusplus
41 
42 /*
43  * If under C++ and this is allowed, then we can add functions which
44  * require the C++ Standard Library (say under GCC 2.95.2 or later).
45  */
46 #ifdef DRAMA_ALLOW_CPP_STDLIB
47 #include <string>
48 #endif
49 
50 extern "C" {
51 
52 #endif
53 #include "sds.h"
54 #include "arg_err.h"
55 #include "status.h"
56 
57 #define ARG_SDS -1
58 #define ARG_STRING -2
59 #define ARG_STRING2 -3
60 
61 /*
62  * Is const acceptable on this machine.
63  */
64 #if defined(__cplusplus) || defined(__STDC__) || defined (VAXC)
65 # define ARGCONST const
66 #else
67 # define ARGCONST /* */
68 #endif
69 
70 
71 /*
72  * Under Windows, we may need to export or import the functions, depending
73  * on if we are building the DLL or linking against it.
74  */
75 #ifdef WIN32
76 #ifdef DRAMA_DLL /* Am building DRAMA DLL */
77 #define ARGEXTERN __declspec(dllexport)
78 #elif defined(DRAMA_STATIC) /* Building a static library */
79 #define ARGEXTERN extern
80 #else /* Am building application with DLL */
81 #define ARGEXTERN __declspec(dllimport)
82 #endif
83 
84 #else
85 #define ARGEXTERN extern
86 #endif
87 
88 /*
89  * If defined, we are using the newer C++ overloads.
90  */
91 #define ARG_NEWCPP_OVERLOADS 1
92 
93 
94 ARGEXTERN void ArgNew(SdsIdType *id, StatusType * ARGCONST status);
95 ARGEXTERN void ArgPutc(SdsIdType id, ARGCONST char *name, char value,
96  StatusType * ARGCONST status);
97 ARGEXTERN void ArgPuts(SdsIdType id, ARGCONST char *name, short value,
98  StatusType * ARGCONST status);
99 ARGEXTERN void ArgPutus(SdsIdType id, ARGCONST char *name, unsigned short value,
100  StatusType * ARGCONST status);
101 ARGEXTERN void ArgPuti(SdsIdType id, ARGCONST char *name, long value,
102  StatusType * ARGCONST status);
103 ARGEXTERN void ArgPuti64(SdsIdType id, ARGCONST char *name, INT64 value,
104  StatusType * ARGCONST status);
105 
106 ARGEXTERN void ArgPutu(SdsIdType id, ARGCONST char *name, unsigned long value,
107  StatusType * ARGCONST status);
108 
109 ARGEXTERN void ArgPutu64(SdsIdType id, ARGCONST char *name, UINT64 value,
110  StatusType * ARGCONST status);
111 
112 ARGEXTERN void ArgPutf(SdsIdType id, ARGCONST char *name, float value,
113  StatusType * ARGCONST status);
114 ARGEXTERN void ArgPutd(SdsIdType id, ARGCONST char *name, double value,
115  StatusType * ARGCONST status);
116 ARGEXTERN void ArgPutString(SdsIdType id, ARGCONST char *name, ARGCONST char *value,
117  StatusType * ARGCONST status);
118 ARGEXTERN void ArgGetc(SdsIdType id, ARGCONST char *name, char *value,
119  StatusType * ARGCONST status);
120 ARGEXTERN void ArgGets(SdsIdType id, ARGCONST char *name, short *value,
121  StatusType * ARGCONST status);
122 ARGEXTERN void ArgGetus(SdsIdType id, ARGCONST char *name, unsigned short *value,
123  StatusType * ARGCONST status);
124 ARGEXTERN void ArgGeti(SdsIdType id, ARGCONST char *name, long *value,
125  StatusType * ARGCONST status);
126 ARGEXTERN void ArgGeti64(SdsIdType id, ARGCONST char *name, INT64 *value,
127  StatusType * ARGCONST status);
128 
129 ARGEXTERN void ArgGetu(SdsIdType id, ARGCONST char *name, unsigned long *value,
130  StatusType * ARGCONST status);
131 ARGEXTERN void ArgGetu64(SdsIdType id, ARGCONST char *name, UINT64 *value,
132  StatusType * ARGCONST status);
133 
134 ARGEXTERN void ArgGetf(SdsIdType id, ARGCONST char *name, float *value,
135  StatusType * ARGCONST status);
136 ARGEXTERN void ArgGetd(SdsIdType id, ARGCONST char *name, double *value,
137  StatusType * ARGCONST status);
138 ARGEXTERN void ArgGetString(SdsIdType id, ARGCONST char *name, long len, char *value,
139  StatusType * ARGCONST status);
140 ARGEXTERN void ArgDelete(SdsIdType id, StatusType * ARGCONST status);
141 
142 
143 ARGEXTERN void ArgCvt (ARGCONST void * SrcAddr, SdsCodeType SrcType, SdsCodeType DstType,
144  void * DstAddr, unsigned long int DstLen ,
145  StatusType * ARGCONST status);
146 ARGEXTERN void ArgLook (char *SrcAddr, int USFlag, int MinFlag, SdsCodeType *DstType,
147  StatusType * ARGCONST status);
148 
149 
150 ARGEXTERN void ArgToString (SdsIdType id,int maxlen,int *length,char *string,
151  StatusType * ARGCONST status);
152 
153 typedef void (*ArgListFuncType)(
154  void *client_data,
155  ARGCONST char *line,
156  StatusType * status);
157 ARGEXTERN void ArgSdsList(SdsIdType id, unsigned buflen, char *buffer,
158  ArgListFuncType func, void * client_data,
159  StatusType * ARGCONST status);
160 
161 
162 ARGEXTERN void ArgFind(SdsIdType parent_id, ARGCONST char *name,
163  SdsIdType *id,
164  StatusType * ARGCONST status);
165 
166 ARGEXTERN void ArgCheckItem(SdsIdType id,
167  SdsCodeType code, long ndims,
168  long * ARGCONST dims,
169  StatusType * ARGCONST status);
170 
171 
172 /*
173  * Methods for creating/setting array items. We don't have the complete
174  * set as yet.
175  */
176 ARGEXTERN void ArgPut1DArrayD(SdsIdType id,
177  const char *name,
178  unsigned long dim,
179  const double data[],
180  StatusType * status);
181 
182 
183 ARGEXTERN void ArgPut1DArrayDElem(SdsIdType id,
184  const char *name,
185  unsigned long dim,
186  unsigned int index,
187  double data,
188  StatusType * const status);
189 
190 
191 ARGEXTERN void ArgPut1DArrayI(SdsIdType id,
192  const char *name,
193  unsigned long dim,
194  const INT32 data[],
195  StatusType * status);
196 
197 
198 ARGEXTERN void ArgPut1DArrayIElem(SdsIdType id,
199  const char *name,
200  unsigned long dim,
201  unsigned int index,
202  INT32 data,
203  StatusType * const status);
204 
205 ARGEXTERN void ArgPut1DArrayB(SdsIdType id,
206  const char *name,
207  unsigned long dim,
208  const unsigned char data[],
209  StatusType * status);
210 
211 
212 ARGEXTERN void ArgPut1DArrayBElem(SdsIdType id,
213  const char *name,
214  unsigned long dim,
215  unsigned int index,
216  unsigned char data,
217  StatusType * const status);
218 
219 
220 
221 ARGEXTERN void ArgPut1DArrayS(SdsIdType id,
222  const char *name,
223  unsigned long slen,
224  unsigned long dim,
225  const char *data[],
226  StatusType * status);
227 
228 
229 ARGEXTERN void ArgPut1DArraySElem(SdsIdType id,
230  const char *name,
231  unsigned long slen,
232  unsigned long dim,
233  unsigned int index,
234  const char *data,
235  StatusType * const status);
236 
237 
238 #ifdef __cplusplus
239 } /* extern "C" */
240 
241 
242 /*
243  * C++ only section.
244  *
245  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
246  *
247  * Here is the a C++ interface to ARG. No object modifications required since
248  * all code is inline.
249  */
267 class Arg : public SdsId {
268  private:
269  /* Assignment and Copy operators, made private to avoid misuse, but
270  this is done in SdsId so would have been prohibited anyway
271  */
272  Arg& operator=(const Arg&); /* Assignment */
273  Arg(const Arg&); /* Copy */
274  public:
298  Arg (const SdsIdType item=0, const bool free=false,
299  const bool del = false, const bool readfree = false) :
300  SdsId(item,free,del,readfree) {
301  };
318  Arg (bool /*flag*/, StatusType * const status,
319  const char * const name = "ArgStructure") :
320  SdsId(name, SDS_STRUCT,status) {
321  }
322 
335  void New (StatusType * const status,
336  const char * const name = "ArgStructure") {
337  /*
338  * We create the new item and then us SdsId::ShallowCopy to
339  * copy it into this object.
340  */
341  Arg tid(true,status, name);
342  ShallowCopy(tid,true);
343  };
344 
359  Arg(const SdsId& source, const char * const name,
360  StatusType * const status) :
361  SdsId(0,false,false,false) {
362  /*
363  * This is confusing since what we really want is to do is SdsFind
364  * but we want the ErsRep reporting facilities of ArgFind, so we
365  * must create this item as a null item, call ArgFind using the
366  * arguments and then use ShallowCopy to copy the SdsIdType to this
367  * item
368  */
369  SdsIdType tid=0;
370  ArgFind(source,name,&tid,status);
371  ShallowCopy(tid,true,false,false);
372  }
373 
388  void ToString(int maxlen, int *length, char *string,
389  StatusType * const status)
390  {
391  ArgToString(*this,maxlen,length,string,status);
392  }
421  void CheckItem(SdsCodeType code,
422  StatusType *status,
423  long ndims=-1,
424  long * dims=0)
425  {
426  ArgCheckItem(*this, code, ndims, dims, status);
427  }
428 
429 
430 # ifndef CPP_NOBOOL
431 
449  void Put (const char *name, bool value, StatusType * const status) {
450  unsigned short v = (int)value;
451  ArgPutus(*this,name,v,status);
452  };
453 # endif
454 
468  void Put (const char *name, char value, StatusType * const status) {
469  ArgPutc(*this,name,value,status);
470  };
485  void Put (const char *name, short value, StatusType * const status) {
486  ArgPuts(*this,name,value,status);
487  };
503  void Put (const char *name, unsigned short value,
504  StatusType * const status) {
505  ArgPutus(*this,name,value,status);
506  };
507 
523  void Put (const char *name, INT32 value, StatusType * const status) {
524  ArgPuti(*this,name,value,status);
525  };
526 
542  void Put (const char *name, UINT32 value, StatusType * const status) {
543  ArgPutu(*this,name,value,status);
544  };
560  void Put (const char *name, INT64 value, StatusType * const status) {
561  ArgPuti64(*this,name,value,status);
562  };
578  void Put (const char *name, UINT64 value, StatusType * const status) {
579  ArgPutu64(*this,name,value,status);
580  };
596  void Put (const char *name, float value, StatusType * const status) {
597  ArgPutf(*this,name,value,status);
598  };
614  void Put (const char *name, double value, StatusType * const status) {
615  ArgPutd(*this,name,value,status);
616  };
634  void Put (const char *name, const char *value, StatusType * const status) {
635  ArgPutString(*this,name,value,status);
636  };
637 
638 
639 # ifndef CPP_NOBOOL
640 
655  void Get (const char *name, bool * value,
656  StatusType * const status)const {
657  unsigned short v;
658  ArgGetus(*this,name,&v,status);
659  *value = v ? true : false;
660  }
661 # endif
662 
663 
686  void Put (const char *name, const long dim, const double data[],
687  StatusType * const status) {
688  ArgPut1DArrayD(*this, name, dim, data, status);
689  };
690 
691 
692 
715  void Put (const char *name, const long dim, const unsigned index,
716  const double data, StatusType * const status) {
717  ArgPut1DArrayDElem(*this, name, dim, index, data, status);
718  };
719 
720 
721 
722 
745  void Put (const char *name, const long dim, const INT32 data[],
746  StatusType * const status) {
747  ArgPut1DArrayI(*this, name, dim, data, status);
748  };
749 
772  void Put (const char *name, const long dim, const unsigned index,
773  const INT32 data, StatusType * const status) {
774  ArgPut1DArrayIElem(*this, name, dim, index, data, status);
775  };
776 
777 
778 
779 
802  void Put (const char *name, const long dim, const unsigned char data[],
803  StatusType * const status) {
804  ArgPut1DArrayB(*this, name, dim, data, status);
805  };
806 
807 
830  void Put (const char *name, const long dim, const unsigned index,
831  const unsigned char data, StatusType * const status) {
832  ArgPut1DArrayBElem(*this, name, dim, index, data, status);
833  };
834 
835 
864  void Put (const char *name, const long slen, const long dim, const char *data[],
865  StatusType * const status) {
866  ArgPut1DArrayS(*this, name, slen, dim, data, status);
867  };
868 
869 
899  void Put (const char *name, const long slen, const long dim, const unsigned index,
900  const char *data, StatusType * const status) {
901  ArgPut1DArraySElem(*this, name, slen, dim, index, data, status);
902  };
903 
904 
917  void Get (const char *name, char * value, StatusType * const status)const {
918  ArgGetc(*this,name,value,status);
919  }
932  void Get (const char *name, short * value, StatusType * const status)const {
933  ArgGets(*this,name,value,status);
934  }
948  void Get (const char *name, unsigned short * value,
949  StatusType * const status) const {
950  ArgGetus(*this,name,value,status);
951  }
965  void Get (const char *name, INT32 * value, StatusType * const status ) const{
966  long v; /* Since ArgGeti uses long */
967  ArgGeti(*this,name,&v,status);
968  *value = v;
969  }
983  void Get (const char *name, UINT32 * value,
984  StatusType * const status)const {
985  unsigned long v; /* Since ArgGetu always uses long */
986  ArgGetu(*this,name,&v,status);
987  *value = v;
988  }
1002  void Get (const char *name, INT64 * value, StatusType * const status) const{
1003  ArgGeti64(*this,name,value,status);
1004  }
1018  void Get (const char *name, UINT64 * value, StatusType * const status)const{
1019  ArgGetu64(*this,name,value,status);
1020  }
1021 
1034  void Get (const char *name, float * value, StatusType * const status) const{
1035  ArgGetf(*this,name,value,status);
1036  }
1049  void Get (const char *name, double * value, StatusType * const status)const {
1050  ArgGetd(*this,name,value,status);
1051  }
1065  void Get (const char *name, long len, char * value,
1066  StatusType * const status) const{
1067  ArgGetString(*this,name,len,value,status);
1068  }
1087  static void List(const SdsId & id, unsigned buflen, char *buffer,
1088  ArgListFuncType func, void * client_data,
1089  StatusType * ARGCONST status) {
1090  ArgSdsList(id,buflen,buffer,func,client_data,status);
1091  }
1092 
1093 /*
1094  *
1095  * Arg hids some Sds functions, so we redeclare them here.
1096  */
1103  void List(StatusType * const status) const {
1104  SdsList(*this,status);
1105  }
1106 
1113  void List(FILE *to, StatusType * const status) const {
1114  SdsListTo(to, *this,status);
1115  }
1116 
1139  void Get(const unsigned long length,
1140  void * const data,
1141  StatusType * const status,
1142  unsigned long *actlen = 0,
1143  const unsigned long offset=0) const {
1144  SdsId::Get(length,data,status,actlen,offset);
1145  }
1166  void Put(const unsigned long length,
1167  void * const data,
1168  StatusType * const status,
1169  const unsigned long offset=0)
1170  {
1171  SdsId::Put(length,data,status,offset);
1172  }
1173 
1174 
1175 #ifdef DRAMA_ALLOW_CPP_STDLIB
1176  /*
1177  * If DRAMA is allowed to use the C++ Standard Template library, then
1178  * we add these functions to arg. All of these are about using
1179  * std::string instead of char[], and the only complicatef one
1180  * is the Get function which gets the value as a string.
1181  *
1182  */
1183 
1199  Arg(const SdsId &source,
1200  const std::string &name,
1201  StatusType *const status) :
1202  SdsId(0,false,false,false) {
1203  SdsIdType tid=0;
1204  ArgFind(source,name.c_str(),&tid,status);
1205  ShallowCopy(tid,true,false,false);
1206  }
1207 
1228  void Put (const std::string &name, bool value, StatusType * const status) {
1229  unsigned short v = (int)value;
1230  ArgPutus(*this,name.c_str(),v,status);
1231  };
1248  void Put (const std::string &name, char value, StatusType * const status) {
1249  ArgPutc(*this,name.c_str(),value,status);
1250  };
1267  void Put (const std::string &name,short value, StatusType * const status) {
1268  ArgPuts(*this,name.c_str(),value,status);
1269  };
1287  void Put (const std::string &name, unsigned short value,
1288  StatusType * const status) {
1289  ArgPutus(*this,name.c_str(),value,status);
1290  };
1308  void Put (const std::string &name, INT32 value,
1309  StatusType * const status) {
1310  ArgPuti(*this,name.c_str(),value,status);
1311  };
1329  void Put (const std::string &name, UINT32 value,
1330  StatusType * const status) {
1331  ArgPutu(*this,name.c_str(),value,status);
1332  };
1333 
1351  void Put (const std::string &name, INT64 value, StatusType * const status) {
1352  ArgPuti64(*this,name.c_str(),value,status);
1353  };
1371  void Put (const std::string &name, UINT64 value, StatusType * const status) {
1372  ArgPutu64(*this,name.c_str(),value,status);
1373  };
1391  void Put (const std::string &name, float value, StatusType * const status) {
1392  ArgPutf(*this,name.c_str(),value,status);
1393  };
1411  void Put (const std::string &name, double value, StatusType * const status) {
1412  ArgPutd(*this,name.c_str(),value,status);
1413  };
1432  void Put(const char *name,
1433  const std::string &value,
1434  StatusType *status) {
1435  ArgPutString(*this, name, value.c_str(), status);
1436  }
1455  void Put(const std::string &name,
1456  const std::string &value,
1457  StatusType *status) {
1458  Put(name.c_str(), value, status);
1459  }
1477  void Get (const std::string &name, bool * value,
1478  StatusType * const status) const{
1479  unsigned short v;
1480  ArgGetus(*this,name.c_str(),&v,status);
1481  *value = v ? true : false;
1482  }
1497  void Get (const std::string &name, char * value, StatusType * const status) const {
1498  ArgGetc(*this,name.c_str(),value,status);
1499  }
1514  void Get (const std::string &name, short * value, StatusType * const status) const {
1515  ArgGets(*this,name.c_str(),value,status);
1516  }
1532  void Get (const std::string &name, unsigned short * value,
1533  StatusType * const status) const{
1534  ArgGetus(*this,name.c_str(),value,status);
1535  }
1551  void Get (const std::string &name, INT32 * value,
1552  StatusType * const status) const {
1553  Get(name.c_str(), value, status);
1554  }
1570  void Get (const std::string &name, UINT32 * value,
1571  StatusType * const status) const{
1572  Get(name.c_str(), value, status);
1573  }
1589  void Get (const std::string &name, INT64 * value, StatusType * const status) const {
1590  ArgGeti64(*this,name.c_str(),value,status);
1591  }
1606  void Get (const std::string &name, UINT64 * value, StatusType * const status) const {
1607  ArgGetu64(*this,name.c_str(),value,status);
1608  }
1623  void Get (const std::string &name, float * value, StatusType * const status) const {
1624  ArgGetf(*this,name.c_str(),value,status);
1625  }
1640  void Get (const std::string &name, double * value, StatusType * const status) const {
1641  ArgGetd(*this,name.c_str(),value,status);
1642  }
1664  void Get(const char *name,
1665  std::string *value,
1666  StatusType *status,
1667  int buflen = 100) const {
1668 
1669  /* Find the item we are interested in */
1670  Arg ItemId(*this, name, status);
1671  if (*status != STATUS__OK) return;
1672 
1673  char tname[SDS_C_NAMELEN];
1674  SdsCodeType code;
1675  long ndims;
1676  unsigned long dims[SDS_C_MAXARRAYDIMS];
1677 
1678  /* Get details on this item */
1679  ItemId.Info(tname, &code, &ndims, dims, status);
1680  if (*status != STATUS__OK) return;
1681 
1682  if ((code == SDS_CHAR)&&(ndims == 1))
1683  {
1684  /* Character array. Ensure we have sufficent space */
1685  buflen = dims[0] + 1;
1686  }
1687  char *buffer;
1688  buffer = new char[buflen];
1689  if (buffer == 0)
1690  {
1691  *status = ARG__MALLOCERR;
1692  return;
1693  }
1694  ArgGetString(*this, name, buflen, buffer, status);
1695  if (*status == STATUS__OK)
1696  *value = buffer;
1697  delete buffer;
1698 
1699  }
1700 
1701  /*
1702  * Interface to the above were the name string is a std::string.
1703  */
1725  void Get(const std::string &name,
1726  std::string *value,
1727  StatusType *status,
1728  int buflen = 100) const {
1729  Get(name.c_str(), value, status, buflen);
1730  }
1731 #endif
1732 
1733 }; /* class */
1734 
1735 
1736 #endif
1737 
1738 #endif
Arg(bool, StatusType *const status, const char *const name="ArgStructure")
Arg constructor which creates a new SDS structure.
Definition: arg.h:318
void Put(const char *name, INT32 value, StatusType *const status)
Insert a 32 bit integer value into a named component of the Arg structure.
Definition: arg.h:523
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.
Definition: arg.h:1002
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.
Definition: arg.h:1018
void Put(const char *name, char value, StatusType *const status)
Insert a char value into a named component of the Arg structure.
Definition: arg.h:468
void ToString(int maxlen, int *length, char *string, StatusType *const status)
Convert the structure to a string.
Definition: arg.h:388
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.
Definition: arg.h:1514
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.
Definition: arg.h:802
void Put(const std::string &name, short value, StatusType *const status)
Insert a short value into a named component of the Arg structure.
Definition: arg.h:1267
void Get(const std::string &name, char *value, StatusType *const status) const
Fetch a char value from a named component of the Arg structure.
Definition: arg.h:1497
void List(StatusType *const status) const
List the contents of the structure to standard output.
Definition: arg.h:1103
void Get(const char *name, short *value, StatusType *const status) const
Fetch a short integer value from a named component of the Arg structure.
Definition: arg.h:932
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.
Definition: arg.h:1623
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.
Definition: arg.h:1589
Arg(const SdsId &source, const std::string &name, StatusType *const status)
Constructor which returns an id to a named item of another item.
Definition: arg.h:1199
void Put(const char *name, const long dim, const unsigned index, const INT32 data, StatusType *const status)
Insert an 1D INT32 array element.
Definition: arg.h:772
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.
Definition: arg.h:1551
void Put(const char *name, UINT32 value, StatusType *const status)
Insert an unsigned 32 bit integer into a named component of the Arg structure.
Definition: arg.h:542
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.
Definition: arg.h:1640
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.
Definition: arg.h:298
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.
Definition: arg.h:1065
void List(FILE *to, StatusType *const status) const
List the contents of the structure to a file.
Definition: arg.h:1113
void Put(const char *name, short value, StatusType *const status)
Insert a short value into a named component of the Arg structure.
Definition: arg.h:485
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.
Definition: arg.h:1308
A C++ Interface to the SDS Arg library.
Definition: arg.h:267
A C++ Interface to the handling SDS structures.
Definition: sds.h:709
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.
Definition: arg.h:1411
void ShallowCopy(SdsId &source, const bool outlives=true)
Shallow copy from SdsId.
Definition: sds.h:1880
void Put(const char *name, unsigned short value, StatusType *const status)
Insert an unsigned short value into a named component of the Arg structure.
Definition: arg.h:503
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.
Definition: arg.h:948
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.
Definition: arg.h:1351
virtual void Put(const unsigned long length, void *const data, StatusType *const status, const unsigned long offset=0)
Put data into an SDS item.
Definition: sds.h:1567
void Put(const std::string &name, const std::string &value, StatusType *status)
Insert a std::string into a named component of the Arg structure.
Definition: arg.h:1455
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.
Definition: arg.h:1049
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.
Definition: arg.h:965
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.
Definition: arg.h:1139
void Put(const char *name, float value, StatusType *const status)
Insert an float size real value into a named component of the Arg structure.
Definition: arg.h:596
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.
Definition: arg.h:1664
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.
Definition: arg.h:1606
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.
Definition: arg.h:1329
void Put(const std::string &name, char value, StatusType *const status)
Insert a char value into a named component of the Arg structure.
Definition: arg.h:1248
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.
Definition: arg.h:1287
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.
Definition: arg.h:745
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.
Definition: arg.h:983
void Put(const char *name, const long dim, const unsigned index, const double data, StatusType *const status)
Insert an 1D double array element.
Definition: arg.h:715
void Put(const unsigned long length, void *const data, StatusType *const status, const unsigned long offset=0)
Put data into an SDS item.
Definition: arg.h:1166
Arg(const SdsId &source, const char *const name, StatusType *const status)
Constructor which returns an id to a named item of another item.
Definition: arg.h:359
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.
Definition: arg.h:1391
void Put(const char *name, INT64 value, StatusType *const status)
Insert a 64 bit integer value into a named component of the Arg structure.
Definition: arg.h:560
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.
Definition: arg.h:686
void Put(const char *name, double value, StatusType *const status)
Insert an double size real value into a named component of the Arg structure.
Definition: arg.h:614
void Get(const char *name, bool *value, StatusType *const status) const
Fetch a boolean value from a named component of the Arg structure.
Definition: arg.h:655
void New(StatusType *const status, const char *const name="ArgStructure")
Create a new Arg structure within this object.
Definition: arg.h:335
void Put(const char *name, const std::string &value, StatusType *status)
Insert a std::string into a named component of the Arg structure.
Definition: arg.h:1432
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.
Definition: arg.h:578
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.
Definition: arg.h:1034
void Put(const char *name, const char *value, StatusType *const status)
Insert a char * string into a named component of the Arg structure.
Definition: arg.h:634
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.
Definition: arg.h:1570
void Put(const std::string &name, bool value, StatusType *const status)
Insert a boolean value into a named component of the Arg structure.
Definition: arg.h:1228
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.
Definition: arg.h:1725
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.
Definition: sds.h:1383
void CheckItem(SdsCodeType code, StatusType *status, long ndims=-1, long *dims=0)
Check an item has a required structure.
Definition: arg.h:421
void Get(const std::string &name, bool *value, StatusType *const status) const
Fetch a boolean value from a named component of the Arg structure.
Definition: arg.h:1477
void Get(const char *name, char *value, StatusType *const status) const
Fetch a char value from a named component of the Arg structure.
Definition: arg.h:917
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.
Definition: arg.h:1532
void Put(const char *name, bool value, StatusType *const status)
Insert a boolean value into a named component of the Arg structure.
Definition: arg.h:449
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.
Definition: arg.h:1371
virtual 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.
Definition: sds.h:1328
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.
Definition: arg.h:864
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.
Definition: arg.h:830
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.
Definition: arg.h:1087
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.
Definition: arg.h:899

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 doxygen 1.8.10