12.14 ISInfoT<T>
ISInfo
#include <is/infoT.h>
ISInfoInt ii;
ISInfoFloat if;
The IS C++ API defines information classes for all the basic C++ types. All these classes are produced from the ISInfoT<T> template class and therefore have the same set of operators and methods. These classes are defined as:
typedef ISInfoT<char> ISInfoChar;
typedef ISInfoT<short> ISInfoShort;
typedef ISInfoT<int> ISInfoInt;
typedef ISInfoT<long> ISInfoLong;
typedef ISInfoT<unsigned char> ISInfoUnsignedChar;
typedef ISInfoT<unsigned short> ISInfoUnsignedShort;
typedef ISInfoT<unsigned int> ISInfoUnsignedInt;
typedef ISInfoT<unsigned long> ISInfoUnsignedLong;
typedef ISInfoT<float> ISInfoFloat;
typedef ISInfoT<double> ISInfoDouble;
typedef ISInfoT<std::string> ISInfoString;
1: #include <is/ISInfoT.h>
2:
3: IPCPartition partition("MyPartition");
4: ISInfoDictionary dict(partitition);
5:
6: ISInfoInt voltage( 220 );
7: dict.insert( "MyServer.DeviceVoltage", voltage );
8:
9: voltage = 360;
10: dict.update( "MyServer.DeviceVoltage", voltage );
ISInfoT<T>( );
-
Constructs new ISInfoT object. Doesn't initialize the data this object is holding.
ISInfoT( const T & val );
-
Constructs new ISInfoT object. Set initial value of the data this object is holding to val.
ISInfoT & operator=( const T & data )
-
Assignment operator. Copies the value of data to self. Returns a reference to self.
operator const T & () const;
-
Type conversion operator. Provides access to the information's data as a value of type T.
void
setValue(const T & data);
-
Sets the information value to data.
const T &
getValue() const;
-
Returns the information value.
2 July 1998 - WebMaster | Copyright © CERN 1998 |