iopc::TextFileMetadataLoader Class Reference
[iopcmeta]

A MetadataInitializer implementation which loads class metaddta and global settings from a configuration file. More...

#include <textFileMetadataLoader.h>

Inheritance diagram for iopc::TextFileMetadataLoader:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 TextFileMetadataLoader (std::string file)
virtual void initializeMetadata ()
 Implementations should set the class metadata or global settings here.


Detailed Description

A MetadataInitializer implementation which loads class metaddta and global settings from a configuration file.

The format of the configuration file is described by the following example:

 # global level
 defaults[db.mapping.type];string;object
 # type level
 ::Person[db.type];string;Person_type
 # attribute level
 ::Person::name[db.type.length];int;20
 # global settings
 globals[db.oracle.workaround.10gOO];bool;true

TextFileMetadataLoader skips all empty lines or lines starting with the '#' character. The file is case-sensitive. Lines describing the metadata contain three semicolon delimited values. First value specifies the location and code of the metadata to be set. It uses the same format as metadata in queries. Second column denotes the data type of the metadata value. Only string, int and bool values are allowed. Last column contains the metadata value. Boolean values can be either true or false.


Constructor & Destructor Documentation

iopc::TextFileMetadataLoader::TextFileMetadataLoader ( std::string  file  )  [inline]

Parameters:
file Name (or path) of the configuration file


Member Function Documentation

void TextFileMetadataLoader::initializeMetadata (  )  [virtual]

Implementations should set the class metadata or global settings here.

Typical implementation would load metadata from a configuration file and use TypeManager and related classes to set them on matching classes and attributes.

Implements iopc::MetadataInitializer.


The documentation for this class was generated from the following files:

Generated on Tue Apr 14 16:46:37 2009 for IOPC 2 by  doxygen 1.5.6