7 #ifndef NAZARA_PARAMETERLIST_HPP 8 #define NAZARA_PARAMETERLIST_HPP 10 #include <Nazara/Prerequesites.hpp> 11 #include <Nazara/Core/Color.hpp> 12 #include <Nazara/Core/String.hpp> 14 #include <unordered_map> 21 using Destructor = void (*)(
void* value);
30 inline void ForEach(
const std::function<
bool(
const ParameterList& list,
const String& name)>& callback);
31 inline void ForEach(
const std::function<
void(
const ParameterList& list,
const String& name)>& callback)
const;
33 bool GetBooleanParameter(
const String& name,
bool* value)
const;
34 bool GetColorParameter(
const String& name,
Color* value)
const;
35 bool GetDoubleParameter(
const String& name,
double* value)
const;
36 bool GetIntegerParameter(
const String& name,
long long* value)
const;
37 bool GetParameterType(
const String& name, ParameterType* type)
const;
38 bool GetPointerParameter(
const String& name,
void** value)
const;
39 bool GetStringParameter(
const String& name,
String* value)
const;
40 bool GetUserdataParameter(
const String& name,
void** value)
const;
42 bool HasParameter(
const String& name)
const;
44 void RemoveParameter(
const String& name);
46 void SetParameter(
const String& name);
47 void SetParameter(
const String& name,
const Color& value);
48 void SetParameter(
const String& name,
const String& value);
49 void SetParameter(
const String& name,
const char* value);
50 void SetParameter(
const String& name,
bool value);
51 void SetParameter(
const String& name,
double value);
52 void SetParameter(
const String& name,
long long value);
53 void SetParameter(
const String& name,
void* value);
54 void SetParameter(
const String& name,
void* value, Destructor destructor);
66 UserdataValue(Destructor func,
void* ud) :
73 std::atomic_uint counter;
74 Destructor destructor;
83 Value(
const Value&) {}
92 UserdataValue* userdataVal;
98 Parameter& CreateValue(
const String& name);
99 void DestroyValue(Parameter& parameter);
101 using ParameterMap = std::unordered_map<String, Parameter>;
102 ParameterMap m_parameters;
106 std::ostream& operator<<(std::ostream& out,
const Nz::ParameterList& parameterList);
108 #include <Nazara/Core/ParameterList.inl> 110 #endif // NAZARA_PARAMETERLIST_HPP Core class that represents a color.
Definition: Color.hpp:18
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Core class that represents a string.
Definition: String.hpp:22
Core class that represents a list of parameters.
Definition: ParameterList.hpp:18