Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::ParametersT< KeyT > Class Template Reference

Configuration parameters. More...

#include <Parameter.hpp>

Inheritance diagram for castor3d::ParametersT< KeyT >:
Inheritance graph
[legend]

Public Member Functions

 ParametersT ()=default
 Constructor. More...
 
void parse (castor::String const &text)
 Parses the given text into a parameters list. More...
 
template<typename ValueT >
bool add (KeyT const &name, ValueT *values, uint32_t count)
 adds a parameter More...
 
void add (ParametersT const &parameters)
 adds a parameters list. More...
 
template<typename ValueT , uint32_t N>
bool add (KeyT const &name, ValueT const(&values)[N])
 adds a parameter More...
 
template<typename ValueT >
bool add (KeyT const &name, ValueT const &value)
 adds a parameter More...
 
bool add (KeyT const &name, castor::String const &value)
 adds a string parameter More...
 
bool add (KeyT const &name, castor::Path const &value)
 adds a string parameter More...
 
template<typename ValueT >
bool set (KeyT const &name, ValueT const &value)
 Sets a parameter value. More...
 
template<typename ValueT >
bool get (KeyT const &name, ValueT *values, uint32_t count) const
 Retrieves a parameter value. More...
 
template<typename ValueT >
bool get (KeyT const &name, ValueT &value) const
 Retrieves a parameter value. More...
 
template<typename ValueT , uint32_t N>
bool get (KeyT const &name, ValueT(&values)[N]) const
 Retrieves a parameter value. More...
 
bool get (KeyT const &name, castor::String &value) const
 Retrieves a parameter value. More...
 
bool get (KeyT const &name, castor::Path &value) const
 Retrieves a parameter value. More...
 
template<typename ValueT >
ValueT get (KeyT const &name) const
 Retrieves a parameter value. More...
 
size_t size () const
 

Detailed Description

template<typename KeyT>
class castor3d::ParametersT< KeyT >

Configuration parameters.

Remarks
Pair of a name and binary data.

Constructor & Destructor Documentation

◆ ParametersT()

template<typename KeyT >
castor3d::ParametersT< KeyT >::ParametersT ( )
default

Constructor.

Member Function Documentation

◆ add() [1/6]

template<typename KeyT >
bool castor3d::ParametersT< KeyT >::add ( KeyT const &  name,
castor::Path const &  value 
)
inline

adds a string parameter

Remarks
If a parameter with the given name already exists, nothing is done
Parameters
[in]nameThe parameter name
[in]valueThe parameter value
Returns
false if a parameter with the given name already exists

References castor3d::ParametersT< KeyT >::add().

Here is the call graph for this function:

◆ add() [2/6]

template<typename KeyT >
bool castor3d::ParametersT< KeyT >::add ( KeyT const &  name,
castor::String const &  value 
)
inline

adds a string parameter

Remarks
If a parameter with the given name already exists, nothing is done
Parameters
[in]nameThe parameter name
[in]valueThe parameter value
Returns
false if a parameter with the given name already exists

References castor3d::ParametersT< KeyT >::size().

Here is the call graph for this function:

◆ add() [3/6]

template<typename KeyT >
template<typename ValueT >
bool castor3d::ParametersT< KeyT >::add ( KeyT const &  name,
ValueT *  values,
uint32_t  count 
)
inline

adds a parameter

Remarks
If a parameter with the given name already exists, nothing is done
Parameters
[in]nameThe parameter name
[in]valuesThe parameter values
[in]countThe values count
Returns
false if a parameter with the given name already exists

Referenced by castor3d::ParametersT< KeyT >::add(), and castor3d::ParametersT< KeyT >::parse().

Here is the caller graph for this function:

◆ add() [4/6]

template<typename KeyT >
template<typename ValueT >
bool castor3d::ParametersT< KeyT >::add ( KeyT const &  name,
ValueT const &  value 
)
inline

adds a parameter

Remarks
If a parameter with the given name already exists, nothing is done
Parameters
[in]nameThe parameter name
[in]valueThe parameter value
Returns
false if a parameter with the given name already exists

References castor3d::ParametersT< KeyT >::add().

Here is the call graph for this function:

◆ add() [5/6]

template<typename KeyT >
template<typename ValueT , uint32_t N>
bool castor3d::ParametersT< KeyT >::add ( KeyT const &  name,
ValueT const(&)  values[N] 
)
inline

adds a parameter

Remarks
If a parameter with the given name already exists, nothing is done
Parameters
[in]nameThe parameter name
[in]valuesThe parameter values
Returns
false if a parameter with the given name already exists

References castor3d::ParametersT< KeyT >::add().

Here is the call graph for this function:

◆ add() [6/6]

template<typename KeyT >
void castor3d::ParametersT< KeyT >::add ( ParametersT< KeyT > const &  parameters)
inline

adds a parameters list.

Parameters
[in]parametersThe parameters list.

◆ get() [1/6]

template<typename KeyT >
template<typename ValueT >
ValueT castor3d::ParametersT< KeyT >::get ( KeyT const &  name) const
inline

Retrieves a parameter value.

Parameters
[in]nameThe parameter name

References castor3d::ParametersT< KeyT >::get().

Here is the call graph for this function:

◆ get() [2/6]

template<typename KeyT >
bool castor3d::ParametersT< KeyT >::get ( KeyT const &  name,
castor::Path &  value 
) const
inline

Retrieves a parameter value.

Parameters
[in]nameThe parameter name
[out]valueThe parameter value
Returns
false if there is no parameter with the given name

References castor3d::ParametersT< KeyT >::get().

Here is the call graph for this function:

◆ get() [3/6]

template<typename KeyT >
bool castor3d::ParametersT< KeyT >::get ( KeyT const &  name,
castor::String &  value 
) const
inline

Retrieves a parameter value.

Parameters
[in]nameThe parameter name
[out]valueThe parameter value
Returns
false if there is no parameter with the given name

◆ get() [4/6]

template<typename KeyT >
template<typename ValueT >
bool castor3d::ParametersT< KeyT >::get ( KeyT const &  name,
ValueT &  value 
) const
inline

Retrieves a parameter value.

Parameters
[in]nameThe parameter name
[out]valueThe parameter value
Returns
false if there is no parameter with the given name

References castor3d::ParametersT< KeyT >::get().

Here is the call graph for this function:

◆ get() [5/6]

template<typename KeyT >
template<typename ValueT >
bool castor3d::ParametersT< KeyT >::get ( KeyT const &  name,
ValueT *  values,
uint32_t  count 
) const
inline

Retrieves a parameter value.

Parameters
[in]nameThe parameter name
[out]valuesThe parameter values
[in]countThe values available count
Returns
false if there is no parameter with the given name

Referenced by castor3d::ParametersT< KeyT >::get().

Here is the caller graph for this function:

◆ get() [6/6]

template<typename KeyT >
template<typename ValueT , uint32_t N>
bool castor3d::ParametersT< KeyT >::get ( KeyT const &  name,
ValueT(&)  values[N] 
) const
inline

Retrieves a parameter value.

Parameters
[in]nameThe parameter name
[out]valuesThe parameter values
Returns
false if there is no parameter with the given name

References castor3d::ParametersT< KeyT >::get().

Here is the call graph for this function:

◆ parse()

template<typename KeyT >
void castor3d::ParametersT< KeyT >::parse ( castor::String const &  text)
inline

Parses the given text into a parameters list.

Parameters
[in]textThe source text.

References castor3d::ParametersT< KeyT >::add().

Here is the call graph for this function:

◆ set()

template<typename KeyT >
template<typename ValueT >
bool castor3d::ParametersT< KeyT >::set ( KeyT const &  name,
ValueT const &  value 
)
inline

Sets a parameter value.

Parameters
[in]nameThe parameter name
[in]valueThe parameter value
Returns
false if there is no parameter with the given name

◆ size()

template<typename KeyT >
size_t castor3d::ParametersT< KeyT >::size ( ) const
inline

Referenced by castor3d::ParametersT< KeyT >::add().

Here is the caller graph for this function:

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