Synopsis |
#include <is/infodocument.h>
const ISInfoDocument::Attribute * attr = isinfodoc.attribute( i );
Description |
This class can be used to get the meta-information for the attributes of an IS information type. This meta-information includes attribute name, type and optional text describing this attribute.This class doesn't have public constructors. User can get a pointer to the instance of this class via the attribute method of the ISInfoDocument class.
Example |
#include <Person.h>
IPCPartition p ( "MyPartition" );
Person person;
ISInfoDocument isd( p, person );
std::cout << "class " << isd.name() << " { // " << isd.description() << std::endl;
for ( unsigned int i = 0; i < isd.attributeCount(); i++ )
{
const ISInfoDocument::Attribute * attr = isd.attribute( i );
std::cout << "" << attr -> typeName()
<< ( attr -> isArray() ? "[] " : " " )
<< attr -> name() << "; // "
<< attr -> description() << std::endl;
}
std::cout << "};" << std::endl;
Public Member Functions |
const std::string &
description ( ) const
Returns attribute's text description. This might be an empty string if description has not been provided.
IntegerFormat
format ( ) const
Returns the format modifier, as defined in the corresponding XML file, which can be used to change the integer number representation in the text output. The IntegerFormat type is declared as standard stream manipulator:
typedef std::ios_base& (*IntegerFormat)(std::ios_base&)
This function can return the following values: std::oct, std::dec, std::hex.
bool
isArray ( ) const
Returns true if attribute is an array, otherwise returns false.
const std::string &
name ( ) const
const std::string &
range ( ) const
ISType::Basic
typeCode ( ) const
const std::string &
typeName ( ) const
2 July 1998 - WebMaster | Copyright © CERN 1998 |