Orxonox
0.0.5 Codename: Arcturus
|
The LevelInfoItem class stores information regarding a Level and makes that information accessible through the LevelManager. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/orxonox/LevelInfo.h>
Public Member Functions | |
LevelInfoItem () | |
Default constructor. More... | |
LevelInfoItem (const std::string &name, const std::string filename) | |
Constructor. Initializes the object. More... | |
virtual | ~LevelInfoItem () |
Destructor. More... | |
bool | addStartingShip (const std::string &ship, bool update=true) |
Add a model to shipselection. More... | |
bool | addTag (const std::string &tag, bool update=true) |
Add a tag to the set of tags the Level is tagged with. More... | |
const std::string & | getDescription () const |
Get the description of the Level. More... | |
const std::string & | getName (void) const |
Get the name of the Level. More... | |
const std::string & | getScreenshot () const |
Get the screenshot of the Level. More... | |
const std::string & | getStartingShips (void) const |
Get the set of starting ship models the Level allows. More... | |
const std::string & | getTags (void) const |
Get the lis of the tags the Level is tagged with. More... | |
const std::string & | getXMLFilename (void) const |
Get the XML-filename of the Level. More... | |
bool | hasStartingShip (const std::string &ship) const |
Get whether the Level allows a specific starting ship model. More... | |
bool | hasTag (const std::string &tag) const |
Get whether the Level has a specific tag. More... | |
void | selectStartingShip (const std::string &ship) |
void | setDescription (const std::string &description) |
Set the description of the Level. More... | |
void | setName (const std::string &name) |
Set the name of the Level. More... | |
void | setScreenshot (const std::string &screenshot) |
Set the screenshot of the Level. More... | |
void | setStartingShips (const std::string &ships) |
Set the starting ship models of the level. More... | |
void | setTags (const std::string &tags) |
Set the tags the Level is tagged with. More... | |
Public Member Functions inherited from orxonox::OrxonoxInterface | |
OrxonoxInterface () | |
Public Member Functions inherited from orxonox::Configurable | |
Configurable () | |
void | setConfigValues () |
Function to collect the SetConfigValue-macro calls. More... | |
Public Member Functions inherited from orxonox::Listable | |
Listable () | |
Constructor: Allocates space in the element list. More... | |
Listable (Context *context) | |
Constructor: Allocates space in the element list and assigns the context. More... | |
virtual | ~Listable () |
Destructor: Removes the object from the object-lists. More... | |
Context * | getContext () const |
void | setContext (Context *context) |
Changes the context. More... | |
void | unregisterObject () |
Removes this object from the object-lists. More... | |
Public Member Functions inherited from orxonox::Identifiable | |
Identifiable () | |
Constructor: Sets the default values. More... | |
virtual | ~Identifiable () |
ORX_FORCEINLINE void * | getDerivedPointer (unsigned int classID) |
Returns a valid pointer of any derived type that is registered in the class hierarchy. More... | |
template<class T > | |
ORX_FORCEINLINE T * | getDerivedPointer (unsigned int classID) |
Version of getDerivedPointer with template. More... | |
template<class T > | |
ORX_FORCEINLINE const T * | getDerivedPointer (unsigned int classID) const |
Const version of getDerivedPointer with template. More... | |
Identifier * | getIdentifier () const |
Returns the Identifier of the object. More... | |
bool | isA (const Identifier *identifier) |
Returns true if the object's class is of the given type or a derivative. More... | |
template<class B > | |
bool | isA (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is of the given type or a derivative. More... | |
bool | isA (const Identifiable *object) |
Returns true if the object's class is of the given type or a derivative. More... | |
bool | isChildOf (const Identifier *identifier) |
Returns true if the object's class is a child of the given type. More... | |
template<class B > | |
bool | isChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a child of the given type. More... | |
bool | isChildOf (const Identifiable *object) |
Returns true if the object's class is a child of the given type. More... | |
bool | isDirectChildOf (const Identifier *identifier) |
Returns true if the object's class is a direct child of the given type. More... | |
template<class B > | |
bool | isDirectChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isDirectChildOf (const Identifiable *object) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isDirectParentOf (const Identifier *identifier) |
Returns true if the object's class is a direct parent of the given type. More... | |
template<class B > | |
bool | isDirectParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a direct parent of the given type. More... | |
bool | isDirectParentOf (const Identifiable *object) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isExactlyA (const Identifier *identifier) |
Returns true if the object's class is exactly of the given type. More... | |
template<class B > | |
bool | isExactlyA (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is exactly of the given type. More... | |
bool | isExactlyA (const Identifiable *object) |
Returns true if the object's class is exactly of the given type. More... | |
bool | isParentOf (const Identifier *identifier) |
Returns true if the object's class is a parent of the given type. More... | |
template<class B > | |
bool | isParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a parent of the given type. More... | |
bool | isParentOf (const Identifiable *object) |
Returns true if the object's class is a parent of the given type. More... | |
Public Member Functions inherited from orxonox::Destroyable | |
Destroyable () | |
Constructor: Sets the default values. More... | |
virtual | ~Destroyable () |
Destructor: Notifies all DestructionListener (for example weak pointers) that this object is being deleted. More... | |
void | destroy () |
Deletes the object if no strong pointers point to this object. More... | |
void | destroyLater () |
Works like destroy() but doesn't destroy the object until the current tick has ended. More... | |
unsigned int | getReferenceCount () const |
Returns the number of strong pointers that point to this object. More... | |
Protected Member Functions | |
void | setXMLFilename (const std::string &filename) |
Set the XML-filename of the Level. More... | |
Protected Member Functions inherited from orxonox::Destroyable | |
virtual void | preDestroy () |
This virtual function is called if destroy() is called and no StrongPtr points to this object. More... | |
Protected Attributes | |
std::string | xmlfilename_ |
The XML-filename of the Level. More... | |
Private Member Functions | |
void | changeStartingShip (const std::string &model) |
void | startingshipsUpdated (void) |
Updates the comma-seperated string of all possible starting ships. More... | |
void | tagsUpdated (void) |
Updates the comma-seperated string of all tags, if the set of tags has changed. More... | |
Static Private Member Functions | |
static void | initializeTags (void) |
Initialize the set of allowed tags. More... | |
static bool | validateTag (const std::string &tag) |
Check whether an input tag is allowed. More... | |
Private Attributes | |
std::string | description_ |
The description of the Level. More... | |
std::string | name_ |
The name of the Level. More... | |
std::string | screenshot_ |
The screenshot of the Level. More... | |
std::set< std::string > | startingShips_ |
The set of starting ship models the Level allows. More... | |
std::string | startingShipsString_ |
The comma-seperated string of all the allowed ship models for the shipselection. More... | |
std::set< std::string > | tags_ |
The set of tags the Level is tagged with. More... | |
std::string | tagsString_ |
The comma-seperated string of all the tags the Level is tagged with. More... | |
Static Private Attributes | |
static const bool | initialized_s = false |
Whether the set of allowed tags has been inizialized. More... | |
static std::set< std::string > | possibleTags_s = std::set<std::string>() |
The set of allowed tags. More... | |
The LevelInfoItem class stores information regarding a Level and makes that information accessible through the LevelManager.
A LevelInfoItem object is commonly created from a LevelInfo object, using its copy()
method.
orxonox::LevelInfoItem::LevelInfoItem | ( | ) |
Default constructor.
orxonox::LevelInfoItem::LevelInfoItem | ( | const std::string & | name, |
const std::string | filename | ||
) |
|
virtual |
Destructor.
bool orxonox::LevelInfoItem::addStartingShip | ( | const std::string & | ship, |
bool | update = true |
||
) |
Add a model to shipselection.
Add a ship model to allowed models for the shipselection.
ship | The ship model to be added. |
update | Whether the comma-seperated string of all ship models should be updated. Default is true. |
bool orxonox::LevelInfoItem::addTag | ( | const std::string & | tag, |
bool | update = true |
||
) |
Add a tag to the set of tags the Level is tagged with.
tag | The tag to be added. |
update | Whether the comma-seperated string of all tags should be updated. Default is true. |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
Get the set of starting ship models the Level allows.
|
inline |
|
inline |
|
inline |
|
inline |
Initialize the set of allowed tags.
|
inline |
|
inline |
Set the description of the Level.
description | The description to be set. |
|
inline |
Set the name of the Level.
name | The name to be set. |
|
inline |
Set the screenshot of the Level.
screenshot | The screenshot to be set. |
void orxonox::LevelInfoItem::setStartingShips | ( | const std::string & | ships | ) |
Set the starting ship models of the level.
ships | A comma-seperated string of all the allowed ship models for the shipselection. |
void orxonox::LevelInfoItem::setTags | ( | const std::string & | tags | ) |
Set the tags the Level is tagged with.
tags | A comma-seperated string of all the tags to be set. |
|
inlineprotected |
Set the XML-filename of the Level.
filename | The XML-filename to be set. |
Updates the comma-seperated string of all possible starting ships.
Updates the comma-seperated string of all ships, if the set of tags has changed.
Updates the comma-seperated string of all tags, if the set of tags has changed.
|
inlinestaticprivate |
Check whether an input tag is allowed.
tag | The tag to check. |
|
private |
The description of the Level.
|
staticprivate |
Whether the set of allowed tags has been inizialized.
|
private |
The name of the Level.
|
staticprivate |
The set of allowed tags.
The list of allowed tags.
|
private |
The screenshot of the Level.
|
private |
The set of starting ship models the Level allows.
|
private |
The comma-seperated string of all the allowed ship models for the shipselection.
|
private |
The set of tags the Level is tagged with.
|
private |
The comma-seperated string of all the tags the Level is tagged with.
|
protected |
The XML-filename of the Level.