30 #include <unordered_map>
34 #include "TmxProperty.h"
54 void Parse(
const tinyxml2::XMLNode *propertiesNode);
56 int GetIntProperty(
const std::string &name,
int defaultValue = 0)
const;
58 float GetFloatProperty(
const std::string &name,
float defaultValue = 0.0f)
const;
60 std::string
GetStringProperty(
const std::string &name, std::string defaultValue =
"")
const;
62 bool GetBoolProperty(
const std::string &name,
bool defaultValue =
false)
const;
67 int GetSize()
const {
return properties.size(); }
74 {
return properties; }
78 std::map< std::string, std::string >
GetList()
const;
81 bool Empty()
const {
return properties.empty(); }
84 std::unordered_map< std::string, Property > properties;
bool Empty() const
Returns whether there are no properties.
Definition: TmxPropertySet.h:81
const std::unordered_map< std::string, Property > & GetPropertyMap() const
Returns the unordered map of properties.
Definition: TmxPropertySet.h:73
std::map< std::string, std::string > GetList() const
Returns the STL map of the properties.
Definition: TmxPropertySet.cpp:136
int GetSize() const
Returns the amount of properties.
Definition: TmxPropertySet.h:67
std::string GetStringProperty(const std::string &name, std::string defaultValue="") const
Get a string property.
Definition: TmxPropertySet.cpp:74
This class contains a map of properties.
Definition: TmxPropertySet.h:47
int GetIntProperty(const std::string &name, int defaultValue=0) const
Get a int property.
Definition: TmxPropertySet.cpp:84
Tmx::Color GetColorProperty(const std::string &name, Tmx::Color defaultValue=Tmx::Color()) const
Get a color property.
Definition: TmxPropertySet.cpp:120
bool HasProperty(const std::string &name) const
Checks if a property exists in the set.
Definition: TmxPropertySet.cpp:130
A class used for storing information about a color.
Definition: TmxColor.h:38
float GetFloatProperty(const std::string &name, float defaultValue=0.0f) const
Get a float property.
Definition: TmxPropertySet.cpp:96
void Parse(const tinyxml2::XMLNode *propertiesNode)
Parse a node containing all the property nodes.
Definition: TmxPropertySet.cpp:47
bool GetBoolProperty(const std::string &name, bool defaultValue=false) const
Get a bool property.
Definition: TmxPropertySet.cpp:108