MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::ObjectSettingSetContainer Class Referenceabstract

A base class for other classes that store ObjectSettingSet's. More...

#include <objectsettings.h>

+ Inheritance diagram for Mezzanine::ObjectSettingSetContainer:
+ Collaboration diagram for Mezzanine::ObjectSettingSetContainer:

Public Types

typedef
SubSetVector::const_iterator 
ConstSubSetIterator
 Const Iterator type for ObjectSettingSet instances stored by this class.
 
typedef SubSetVector::iterator SubSetIterator
 Iterator type for ObjectSettingSet instances stored by this class.
 
typedef std::vector
< ObjectSettingSet * > 
SubSetVector
 Basic container type for ObjectSettingSet storage by this class.
 

Public Member Functions

 ObjectSettingSetContainer (const String &Name)
 Class constructor. More...
 
virtual ~ObjectSettingSetContainer ()
 Class destructor.
 
virtual void _MarkUpdated ()=0
 Marks this container and relevant parent containers as updated. More...
 
virtual void AddChildObjectSettingSet (ObjectSettingSet *ToBeAdded)
 Adds a SettingSet as a child of this container. More...
 
virtual ObjectSettingSetCreateChildObjectSettingSet (const String &Name)
 Creates a new SettingSet as a child of this container. More...
 
void DestroyAllObjectSettingSets ()
 Destroys all child Sub-Sets of this container.
 
void DestroyChildObjectSettingSet (const String &Name)
 Destroys a Sub-Set of this container. More...
 
ObjectSettingSetGetChildObjectSettingSet (const String &Name, UInt16 Which=0) const
 Gets a Sub-Set of this container by name. More...
 
ObjectSettingSetGetChildObjectSettingSet (const Whole &Index) const
 Gets a Sub-Set of this container by index. More...
 
ConstStringGetName () const
 Gets the name of this container. More...
 
virtual void RemoveChildObjectSettingSet (ObjectSettingSet *ToBeRemoved)
 Removes a Sub-Set of this container. More...
 
void SetName (const String &Name)
 Sets the name of this container. More...
 
SubSetIterator SubSetBegin ()
 Gets an iterator to the first subset of settings in this set.
 
ConstSubSetIterator SubSetBegin () const
 Gets a const iterator to the first subset of settings in this set.
 
SubSetIterator SubSetEnd ()
 Gets an iterator to one passed the last subset of settings in this set.
 
ConstSubSetIterator SubSetEnd () const
 Gets a const iterator to one passed the last subset of settings in this set.
 

Protected Attributes

String ContainerName
 The name of this container. More...
 
SubSetVector SubSets
 A container of ObjectSettingSet instances owned by this container. More...
 

Detailed Description

A base class for other classes that store ObjectSettingSet's.

Definition at line 64 of file objectsettings.h.

Constructor & Destructor Documentation

Mezzanine::ObjectSettingSetContainer::ObjectSettingSetContainer ( const String Name)

Class constructor.

Parameters
NameThe name of this container.

Definition at line 53 of file objectsettings.cpp.

Member Function Documentation

virtual void Mezzanine::ObjectSettingSetContainer::_MarkUpdated ( )
pure virtual

Marks this container and relevant parent containers as updated.

Implemented in Mezzanine::ObjectSettingGroup, and Mezzanine::ObjectSettingSet.

void Mezzanine::ObjectSettingSetContainer::AddChildObjectSettingSet ( ObjectSettingSet ToBeAdded)
virtual

Adds a SettingSet as a child of this container.

Parameters
ToBeAddedPointer to the SettingSet to be added.

Definition at line 80 of file objectsettings.cpp.

ObjectSettingSet * Mezzanine::ObjectSettingSetContainer::CreateChildObjectSettingSet ( const String Name)
virtual

Creates a new SettingSet as a child of this container.

Parameters
NameThe name of the new set to be created.
Returns
Returns a pointer to the created SettingSet.

Definition at line 72 of file objectsettings.cpp.

void Mezzanine::ObjectSettingSetContainer::DestroyChildObjectSettingSet ( const String Name)

Destroys a Sub-Set of this container.

Parameters
NameThe name of the Sub-Set to be destroyed.

Definition at line 117 of file objectsettings.cpp.

ObjectSettingSet * Mezzanine::ObjectSettingSetContainer::GetChildObjectSettingSet ( const String Name,
UInt16  Which = 0 
) const

Gets a Sub-Set of this container by name.

Remarks
This class does not enforce unique names for child sets. Only settings are forced to have unique names. So when searching for an object by name there can be multiples. Which one you get is determined by the Which parameter.
Parameters
NameThe name of the desired Sub-Set.
WhichWhich named SettingSet to get. 0 for the first, 1 for the second, and so on.
Returns
Returns a pointer to the named Sub-Set, or NULL if it doesn't exist.

Definition at line 87 of file objectsettings.cpp.

ObjectSettingSet * Mezzanine::ObjectSettingSetContainer::GetChildObjectSettingSet ( const Whole Index) const

Gets a Sub-Set of this container by index.

Parameters
IndexThe index of the Sub-Set to get.
Returns
Returns a pointer to the Sub-Set at the specified index.

Definition at line 99 of file objectsettings.cpp.

ConstString & Mezzanine::ObjectSettingSetContainer::GetName ( ) const

Gets the name of this container.

Returns
Returns a const reference to the name of this container.

Definition at line 66 of file objectsettings.cpp.

void Mezzanine::ObjectSettingSetContainer::RemoveChildObjectSettingSet ( ObjectSettingSet ToBeRemoved)
virtual

Removes a Sub-Set of this container.

Parameters
ToBeRemovedThe Sub-Set to be removed.

Definition at line 104 of file objectsettings.cpp.

void Mezzanine::ObjectSettingSetContainer::SetName ( const String Name)

Sets the name of this container.

Parameters
NameThe name to be given to this container.

Definition at line 63 of file objectsettings.cpp.

Member Data Documentation

String Mezzanine::ObjectSettingSetContainer::ContainerName
protected

The name of this container.

Definition at line 76 of file objectsettings.h.

SubSetVector Mezzanine::ObjectSettingSetContainer::SubSets
protected

A container of ObjectSettingSet instances owned by this container.

Definition at line 79 of file objectsettings.h.


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