#include <is/info.h>class Person: public ISInfo {public: enum Sex { Male, Female }; std::vector<std::string> names; unsigned int age; int income; Sex sex; void publishGuts( ISostream & out ){ out << names << age << income << sex; } void refreshGuts( ISistream & in ){ in >> names >> age >> income >> (int&)sex; }};In order to define a new information type, one must declare a new C++ class which has to do the following:
As you can see from the example above it is recommended to use the std::vector as the type of the multi-value information attributes. The old style, which used C like arrays is still supported but not recommended. It will be removed in one of the future releases.| 2 July 1998 - WebMaster | Copyright © CERN 1998 |