next up previous contents index
Next: Using DataCards Up: Module SysTools Previous: NDataBlockT   Contents   Index


Using DVList

\begin{figure}
\framebox [40mm][c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf AnyDataObj} ...
...c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf ObjFileIO$<$DVList$>$} }\\ [2mm]
\end{figure}

The DVList class objects can be used to create and manage list of values, associated with names. A list of pairs of (MuTyV, name(string)) is maintained by DVList objects. MuTyV is a simple class capable of holding string, integer, float or complex values, providing easy conversion methods between these objects.

// Using MuTyV objects
MuTyV s("hello");  // string type value
MuTyV x;
x = "3.14159626";    // string type value, ASCII representation for Pi
double d = x;        // x converted to double = 3.141596
x = 314;             // x contains the integer value = 314
// Using DVList
DVList  dvl;
dvl("Pi") = 3.14159626;            // float value, named Pi
dvl("Log2") = 0.30102999;          // float value, named Log2
dvl("FileName") = "myfile.fits";   // string value, named myfile.fits
// Printing DVList object
cout << dvl;



Reza Ansari
2001-03-07