sdNameSpace Class Reference


Public Methods

 sdNameSpace (const std::string &name, const unsigned int version)
 sdNameSpace (const std::string &name, const unsigned int &version, const StringVector &dependencies, const StringVector &aliases)
virtual ~sdNameSpace ()
const sdValuefindValue (unsigned int enumValue) const
const sdValuefindValue (const std::string &enumName) const
const sdAttributefindAttribute (unsigned int enumValue) const
const sdAttributefindAttribute (const std::string &enumName) const
const sdObjectfindObject (unsigned int enumValue) const
const sdObjectfindObject (const std::string &enumName) const
const sdRelationshipBasefindRelationship (unsigned int enumValue) const
const sdRelationshipBasefindRelationship (const std::string &enumName) const
const std::string & getName () const
unsigned int getVersion () const
bool dependsOn (const sdNameSpace *nameSpace) const
bool isInitialized () const
ValueConstIter beginValue () const
ValueConstIter endValue () const
AttributeConstIter beginAttribute () const
AttributeConstIter endAttribute () const
RelationshipConstIter beginRelationship () const
RelationshipConstIter endRelationship () const
ObjectConstIter beginObject () const
ObjectConstIter endObject () const
StringConstIter beginDependentNameSpace () const
StringConstIter endDependentNameSpace () const
StringConstIter beginNameAlias () const
StringConstIter endNameAlias () const
virtual void accept (sdVisitor *visitor)

Public Types

typedef std::map< unsigned int, const sdValue * > ValueMap
typedef std::map< unsigned int, const sdAttribute * > AttributeMap
typedef std::map< unsigned int, const sdRelationshipBase * > RelationshipMap
typedef std::map< unsigned int, const sdObject * > ObjectMap
typedef std::vector< std::string > StringVector
typedef ValueMap::const_iterator ValueConstIter
typedef AttributeMap::const_iterator AttributeConstIter
typedef RelationshipMap::const_iterator RelationshipConstIter
typedef ObjectMap::const_iterator ObjectConstIter
typedef StringVector::const_iterator StringConstIter

Friends

class sdValue
class sdAttribute
class sdObject
class sdRelationshipBase
class sdField
class sdSession

Detailed Description

The sdNameSpace class is used to partition the schema definitions into different groups and revisions. For example, schema definitions for different data models would use different namespaces.

Note: sdNameSpace is conceptually like a C++ namespace. It serves a different purpose than oaNameSpace, which mainly supports name mapping between different name spaces.

The Creating Schema Definitions document in the Programmers Guide has an example that creates an sdNameSpace.


Member Typedef Documentation

typedef AttributeMap::const_iterator sdNameSpace::AttributeConstIter
 

typedef std::map<unsigned int, const sdAttribute*> sdNameSpace::AttributeMap
 

typedef ObjectMap::const_iterator sdNameSpace::ObjectConstIter
 

typedef std::map<unsigned int, const sdObject*> sdNameSpace::ObjectMap
 

typedef RelationshipMap::const_iterator sdNameSpace::RelationshipConstIter
 

typedef std::map<unsigned int, const sdRelationshipBase*> sdNameSpace::RelationshipMap
 

typedef StringVector::const_iterator sdNameSpace::StringConstIter
 

typedef std::vector<std::string> sdNameSpace::StringVector
 

typedef ValueMap::const_iterator sdNameSpace::ValueConstIter
 

typedef std::map<unsigned int, const sdValue*> sdNameSpace::ValueMap
 


Constructor & Destructor Documentation

sdNameSpace::sdNameSpace const std::string &    name,
const unsigned int    version
 

This is an sdNameSpace constructor that takes a name and a version number.

Parameters:
name The name for the new namespace.
version The version number for the new namespace.

sdNameSpace::sdNameSpace const std::string &    name,
const unsigned int &    version,
const StringVector &    dependencies,
const StringVector &    aliases
 

This sdNameSpace constructor takes a name and a version number, and lets you specify any namespaces that are dependent on this namespace. This constructor also lets you specify aliases for this namespace.

Parameters:
name The name for the new namespace.
version The version number for the new namespace.
dependencies The namespaces that are dependent on this namespace.
aliases Alternative names that can be used to access this namespace.

sdNameSpace::~sdNameSpace   [virtual]
 

This is the sdNameSpace destructor.


Member Function Documentation

void sdNameSpace::accept sdVisitor *    visitor [virtual]
 

This function calls the visit function of the specified visitor on the sdNameSpace object.

Parameters:
visitor A pointer to the visitor to call.

AttributeConstIter sdNameSpace::beginAttribute   const
 

This function returns the constant iterator that points to the first attribute object in this namespace.

NameSpaceConstIter sdNameSpace::beginDependentNameSpace   const
 

This function returns the constant iterator that points to the first dependent namespace of this namespace.

NameAliasConstIter sdNameSpace::beginNameAlias   const
 

This function returns the constant iterator that points to the first name alias of this namespace.

ObjectConstIter sdNameSpace::beginObject   const
 

This function returns the constant iterator that points to the first sdObject in this namespace.

RelationshipConstIter sdNameSpace::beginRelationship   const
 

This function returns the constant iterator that points to the first relationship object in this namespace.

ValueConstIter sdNameSpace::beginValue   const
 

This function returns the constant iterator that points to the first value object in this namespace.

bool sdNameSpace::dependsOn const sdNameSpace *    nameSpace const
 

This function returns a boolean indicating whether or not the specified namespace matches this namespace or any namespace in the dependent namespace hierarchy of this namespace.

Parameters:
nameSpace A pointer to a namespace.

AttributeConstIter sdNameSpace::endAttribute   const
 

This function returns the constant iterator for that points to the last attribute object in this namespace.

NameSpaceConstIter sdNameSpace::endDependentNameSpace   const
 

This function returns the constant iterator that points to the last dependent namespace of this namespace.

NameAliasConstIter sdNameSpace::endNameAlias   const
 

This function returns the constant iterator that points to the last name alias of this namespace.

ObjectConstIter sdNameSpace::endObject   const
 

This function returns the constant iterator that points to the last sdObject in this namespace.

RelationshipConstIter sdNameSpace::endRelationship   const
 

This function returns the constant iterator that points to the last relationship object in this namespace.

ValueConstIter sdNameSpace::endValue   const
 

This function returns the constant iterator that points to the the last value object in this namespace.

sdAttribute const * sdNameSpace::findAttribute const std::string &    enumName const
 

This function returns an sdAttribute object with the specified string name in this namespace. If the sdAttribute object does not exist, this function returns NULL.

Parameters:
enumName The string name of the enum value.

const sdAttribute * sdNameSpace::findAttribute unsigned int    enumValue const
 

This function returns an sdAttribute object with the specified enum value in this namespace. If the sdAttribute object does not exits, this function returns NULL.

Parameters:
enumValue The enum value of the sdAttribute object to find.

sdObject const * sdNameSpace::findObject const std::string &    enumName const
 

This function returns an sdObject object with the specified string name in this namespace. If the sdObject object does not exist, this function returns NULL.

Parameters:
enumName The string name of an enum value.

const sdObject * sdNameSpace::findObject unsigned int    enumValue const
 

This function returns an sdObject with the specified enum value in this namespace. If the sdObject does not exits, this function returns NULL.

Parameters:
enumValue The enum value of the sdObject to find.

sdRelationshipBase const * sdNameSpace::findRelationship const std::string &    enumName const
 

This function returns an sdRelationship object with the specified string name in this namespace. If the sdRelationship object does not exist, this function returns NULL.

Parameters:
enumName The string name of an enum value.

const sdRelationshipBase * sdNameSpace::findRelationship unsigned int    enumValue const
 

This function returns an sdRelationship object with the specified enum value in this namespace. If the sdRelationship object does not exits, this function returns NULL.

Parameters:
enumValue The enum value of the sdRelationshipBase object to find.

sdValue const * sdNameSpace::findValue const std::string &    enumName const
 

This function returns an sdValue object with the specified string name in this namespace. If the sdValue object does not exist, this function returns NULL.

Parameters:
enumName The string name of the enum value.

const sdValue * sdNameSpace::findValue unsigned int    enumValue const
 

This function returns an sdValue object with the specified enum value in this namespace. If the sdValue object does not exits, this function returns NULL.

Parameters:
enumValue The enum value of the sdValue object to find.

const std::string & sdNameSpace::getName   const
 

This function returns the name of this namespace.

unsigned int sdNameSpace::getVersion   const
 

This function returns the version of this namespace.

bool sdNameSpace::isInitialized   const
 

This function returns a boolean indicating whether or not this namespace is initialized. It checks whether any of the object maps is empty.


Friends And Related Function Documentation

friend class sdAttribute [friend]
 

friend class sdField [friend]
 

friend class sdObject [friend]
 

friend class sdRelationshipBase [friend]
 

friend class sdSession [friend]
 

friend class sdValue [friend]
 


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

Return to top of page