40 #ifndef _objectsettings_h
41 #define _objectsettings_h
46 #include "quaternion.h"
47 #include "colourvalue.h"
55 class ObjectSettingSet;
56 class ObjectSettingFile;
57 class ObjectSettingGroup;
92 void SetName(
const String& Name);
124 void DestroyChildObjectSettingSet(
const String& Name);
126 void DestroyAllObjectSettingSets();
132 SubSetIterator SubSetBegin();
134 ConstSubSetIterator SubSetBegin()
const;
136 SubSetIterator SubSetEnd();
138 ConstSubSetIterator SubSetEnd()
const;
145 virtual void _MarkUpdated() = 0;
191 void SetSettingValue(
const String& SettingName,
const String& StringValue);
195 String GetSettingValue(
const String& SettingName)
const;
201 SettingsIterator SettingsBegin();
203 ConstSettingsIterator SettingsBegin()
const;
205 SettingsIterator SettingsEnd();
207 ConstSettingsIterator SettingsEnd()
const;
243 const String& GetOptionalFileName()
const;
292 const String& GetFileName()
const;
295 void SetNeedsSave(
Boole Save);
298 Boole GetNeedsSave()
const;
312 SaveGroupsContainer& GetGroups();
315 SaveGroupsIterator SaveGroupsBegin();
317 ConstSaveGroupsIterator SaveGroupsBegin()
const;
319 SaveGroupsIterator SaveGroupsEnd();
321 ConstSaveGroupsIterator SaveGroupsEnd()
const;
392 virtual String GetObjectRootNodeName()
const = 0;
396 virtual void AppendCurrentSettings(
XML::Node& CurrentNode) = 0;
412 void ApplySettingGroup(
const String& GroupName);
423 void DestroySettingGroup(
const String& Name);
428 void DestroyAllSettingGroups();
444 void DestroySettingFile(
const String& FileName);
451 void DestroyAllSettingFiles();
466 void SetSettingsFilePath(
const String& Path);
469 const String& GetSettingsFilePath()
const;
477 void SetCurrentSettingsSaveFile(
const String& FileName);
511 void SetAutoGenPath(
Boole Enable);
514 Boole GetAutoGenPath()
const;
517 void SetAutoGenFiles(
Boole Enable);
520 Boole GetAutoGenFiles()
const;
526 void SaveAllSettings();
530 void SaveSettingsByFile(
const String& FileName,
const String& Path);
535 void SaveSettingsByFile(
const String& FileName);
558 void SaveSettingsToXML(
XML::Node& RootSettings,
Boole SaveCurrent =
true);
569 void ProtoSerialize(
XML::Node& SelfRoot)
const;
572 void ProtoDeSerialize(
const XML::Node& SelfRoot);
575 static String GetSerializableName();
std::vector< String > StringVector
This is a simple datatype for a vector container of strings.
SettingFilesContainer::const_iterator ConstSettingFilesIterator
Const Iterator type for ObjectSettingGroup instances stored by this class.
ObjectSettingSetContainer * ParentSetOrGroup
A pointer to the parent container of this ObjectSettingSet.
SettingFilesContainer SettingFiles
A container storing all the file saving configuration used by this handler.
bool Boole
Generally acts a single bit, true or false.
SubSetVector::const_iterator ConstSubSetIterator
Const Iterator type for ObjectSettingSet instances stored by this class.
SubSetVector::iterator SubSetIterator
Iterator type for ObjectSettingSet instances stored by this class.
std::map< String, ObjectSettingFile * > SettingFilesContainer
Basic container type for ObjectSettingFile storage by this class.
SaveGroupsContainer::const_iterator ConstSaveGroupsIterator
Const Iterator type for ObjectSettingGroup instances stored by this class.
All the definitions for datatypes as well as some basic conversion functions are defined here...
A class that store's a named set of settings for an object.
A simple reference counting pointer.
String File
The name of the file the stored ObjectSettingGroup instances will be saved to.
std::map< String, ObjectSettingGroup * > SettingGroupContainer
Basic container type for ObjectSettingGroup storage by this class.
String SettingsFilePath
Stores the path to be used for file IO operations done by this handler.
An abstract class for other classes that manage groups of settings.
SettingGroupContainer::const_iterator ConstSettingGroupIterator
Const Iterator type for ObjectSettingGroup instances stored by this class.
This class represents a file to be saved containing one or more OhjectSettingGroup's.
Boole AutoGenFiles
Stores whether or not this handler will attempt to automatically generate a file if it doesn't exist...
uint16_t UInt16
An 16-bit unsigned integer.
A light-weight handle for manipulating nodes in DOM tree.
const String ConstString
A Datatype used to a series of imutable characters.
std::map< String, String > SettingsMap
Basic container type for settings stored as name-value pairs in this class.
Boole NeedsSave
Stores whether or not the settings have been updated and this file needs to be saved/refreshed.
SubSetVector SubSets
A container of ObjectSettingSet instances owned by this container.
This file describes and implements a reference counted pointer that is NOT threadsafe.
std::vector< ObjectSettingGroup * > SaveGroupsContainer
Basic container type for ObjectSettingGroup storage by this class.
SettingGroupContainer::iterator SettingGroupIterator
Iterator type for ObjectSettingGroup instances stored by this class.
Boole AutoGenPath
Stores whether or not this handler will attempt to automatically generate a path to a file if it does...
A base class for other classes that store ObjectSettingSet's.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
ObjectSettingFile * OptionalFile
A pointer to the ObjectSettingFile instance this setting group will be saved to.
SaveGroupsContainer SaveGroups
A container of ObjectSettingGroup instances that will be saved to the file representing by this...
SettingFilesContainer::iterator SettingFilesIterator
Iterator type for ObjectSettingGroup instances stored by this class.
SettingsMap::const_iterator ConstSettingsIterator
Const Iterator type for settings stored by this class.
SettingGroupContainer SettingGroups
A container storing all the SettingGroups owned by this handler.
String CurrentSettingsSaveFile
Stores the name of the file where the "Current" settings group will be saved to.
SaveGroupsContainer::iterator SaveGroupsIterator
Iterator type for ObjectSettingGroup instances stored by this class.
std::vector< ObjectSettingGroup * > SettingGroupVector
Convenience typedef for Load method returns.
std::vector< ObjectSettingSet * > SubSetVector
Basic container type for ObjectSettingSet storage by this class.
A class that store's a collection of SettingSets that can be applied together.
SettingsMap::iterator SettingsIterator
Iterator type for settings stored by this class.
std::string String
A datatype used to a series of characters.
String ContainerName
The name of this container.
SettingsMap Settings
A map container storing the settings owned by this set and their values.