Arxx::Structure::Relation Class Reference

#include <Structure.h>

Collaboration diagram for Arxx::Structure::Relation:

Collaboration graph
[legend]
List of all members.

Detailed Description

The object that holds references to other items.

A Relation is a container for Arxx::Reference objects, which are identified by the unique ID of the referenced Arxx::Item. A Relation is a multiset so that one Arxx::Item may be referenced multiple times.


Public Types

typedef std::multimap< Arxx::u4byte,
Arxx::Reference >::size_type 
size_type

Public Member Functions

void vAdd (Arxx::u4byte u4UniqueID)
 Adds a unique ID reference to the relation.
bool bDelete (Arxx::u4byte u4UniqueID)
 Removes a reference with a certain unique ID from the relation.
size_type size (void) const
 Returns the number of references in the relation.
Arxx::Structure::Relation::iterator begin (void)
 Returns the first reference iterator of the relation.
Arxx::Structure::Relation::iterator end (void)
 Returns the end reference iterator of the relation.
Arxx::Structure::Relation::const_iterator begin (void) const
 Returns the first reference iterator of the relation.
Arxx::Structure::Relation::const_iterator end (void) const
 Returns the end reference iterator of the relation.
const std::string & sGetName (void) const
 Returns the name of the relation.

Private Member Functions

 Relation (Arxx::Structure &Structure, const std::string &sName)
 A constructor that links a relation to a specific Arxx::Structure.

Private Attributes

Arxx::Structurem_Structure
 The related Structure object.
std::multimap< Arxx::u4byte,
Arxx::Reference
m_References
 The Item references stored in the Relation.
std::string m_sName
 The name of the relation.

Friends

class Arxx::Structure

Classes

class  const_iterator
 An iterator class defining basic operations to iterate the Reference objects in a Relation. More...
class  iterator
 An iterator class defining basic operations to iterate the Reference objects in a Relation. More...


Member Typedef Documentation

typedef std::multimap< Arxx::u4byte, Arxx::Reference >::size_type Arxx::Structure::Relation::size_type


Constructor & Destructor Documentation

Arxx::Structure::Relation::Relation ( Arxx::Structure Structure,
const std::string &  sName 
) [private]

A constructor that links a relation to a specific Arxx::Structure.

Parameters:
Structure The structure object that this relation is linked to.
sName The unique name of the relation inside the related Structure.


Member Function Documentation

bool Arxx::Structure::Relation::bDelete ( Arxx::u4byte  u4UniqueID  ) 

Removes a reference with a certain unique ID from the relation.

Parameters:
u4UniqueID The unique ID that is to be deleted from the relation.
This function removes a reference with a certain unique ID from the relation.

Arxx::Structure::Relation::const_iterator Arxx::Structure::Relation::begin ( void   )  const

Returns the first reference iterator of the relation.

Arxx::Structure::Relation::iterator Arxx::Structure::Relation::begin ( void   ) 

Returns the first reference iterator of the relation.

Arxx::Structure::Relation::const_iterator Arxx::Structure::Relation::end ( void   )  const

Returns the end reference iterator of the relation.

Arxx::Structure::Relation::iterator Arxx::Structure::Relation::end ( void   ) 

Returns the end reference iterator of the relation.

const std::string & Arxx::Structure::Relation::sGetName ( void   )  const

Returns the name of the relation.

Arxx::Structure::Relation::size_type Arxx::Structure::Relation::size ( void   )  const

Returns the number of references in the relation.

void Arxx::Structure::Relation::vAdd ( Arxx::u4byte  u4UniqueID  ) 

Adds a unique ID reference to the relation.

Parameters:
u4UniqueID The unique ID that is to be added to the relation.
This function adds a reference to a unique ID to the relation.


Friends And Related Function Documentation

friend class Arxx::Structure [friend]


Member Data Documentation

std::multimap< Arxx::u4byte, Arxx::Reference > Arxx::Structure::Relation::m_References [private]

The Item references stored in the Relation.

std::string Arxx::Structure::Relation::m_sName [private]

The name of the relation.

Arxx::Structure& Arxx::Structure::Relation::m_Structure [private]

The related Structure object.

This is set by the constructor and cannot be changed. Every Relation object is strictly bound to exactly one Structure at creation time.


The documentation for this class was generated from the following files:
Generated on Tue Oct 10 11:34:57 2006 for libarxx by  doxygen 1.4.7