Main Page   Class Hierarchy   Compound List   Compound Members  

SCOREC_Attribute::AttributeFactory Class Reference

#include <AttributeFactory.h>

List of all members.

Public Types

typedef AttributeBase* (* CreateAttributeCallback )(std::vector< std::string > &)

Public Methods

 AttributeFactory ()
virtual ~AttributeFactory ()
bool RegisterAttribute (std::string &AttributeId, CreateAttributeCallback f)
 Register a type identifier representing an attribute and the corresponding attribute creator function.

bool UnregisterAttribute (std::string &AttributeId)
 Unregister a type identifier. The attribute factory will no longer be able to create attributes of that type identifier anymore.

AttributeBaseCreateAttribute (std::string &AttributeId, std::vector< std::string > &AttributeInfo)
 Create an attribute object of the given attribute type.


Detailed Description

Factory method to construct Attributes. A method to construct an attribute can be registered with the AttributeFactory by passing in the type identifier and the static function responsible for creating attributes that are associated with the type identifier. The type identifier can then be saved to disk together with the attribute information to ensure that the correct attribute will be recreated when the attribute file is being read from disk.


The documentation for this class was generated from the following files:
Generated at Mon Jul 23 10:23:24 2001 for SCOREC_UnitSystem by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001