CERN -> IPT Group -> FrameMaker at CERN
Information Service User's Guide

12.8 ISInfoDocument


Synopsis
#include <is/infodocument.h>
#include <Person.h>
IPCPartition p ( "MyPartition" );
Person person;
ISInfoDocument isid( p, person );


Description

This class can be used to get the meta-information for the IS information type. This meta-information includes the information type name, type description and also names, types and descriptions for all the attributes of this type.


Example
1: #include <Person.h>
2:
3: IPCPartition p ( "MyPartition" );
4: Person person;
5: ISInfoDocument isd( p, person );
6: std::cout << "class " << isd.name() << " { // " << isd.description() << std::endl;
7: for ( unsigned int i = 0; i < isd.attributeCount(); i++ )
8: {
9: const ISInfoDocument::Attribute * attr = isd.attribute( i );
10: std::cout << "" << attr -> typeName() << ( attr -> isArray() ? "[] " : " " ) << attr -> name() << "; // " << attr -> description() << std::endl;
11: }
12: std::cout << "};" << std::endl;


Public Constructor
ISInfoDocument( const IPCPartition & p, ISInfo & info );
Constructs new ISInfoDocument object which can be used to get description of the info information object in the p partition.
ISInfoDocument( const IPCPartition & part, const ISType & type );
Constructs new ISInfoDocument object which can be used to get description of the type information type in the p partition.


Public Member Functions
size_t
attributeCount ( ) const
Returns number of attributes for this information type.
const Attribute *
attribute ( size_t N ) const
Returns pointer to the object which contains description for the Nth attribute of this information type.
const std::string &
description ( ) const
Returns text description for this information type.
const std::string &
name ( ) const
Returns name of this information type.
ISInfo::Status
status ( ) const
Returns self status. Status is set during the ISInfoDocument object construction and must be checked immediately after. Returns ISInfo::Success if information type description has been found. Returns ISInfo::NotFound if there is no description for the target information type. Returns ISInfo::CommFailure if the IS types descriptions repository is not available.


2 July 1998 - WebMaster
Copyright © CERN 1998