Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Public Attributes | List of all members
castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > > Class Template Reference

Specified parser parameter. More...

#include <ParserParameter.hpp>

Inheritance diagram for castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >:
Inheritance graph
[legend]
Collaboration diagram for castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >:
Collaboration graph
[legend]

Public Types

using ValueType = ParserParameterValueType< Type >
 

Public Member Functions

 ParserParameter ()
 Constructor.
 
 ParserParameter (ValueType rhs)
 Constructor.
 
 ParserParameter (Range< ValueType > const &range)
 Constructor.
 
 ParserParameter (ValueType rhs, Range< ValueType > const &range)
 Constructor.
 
ParameterType getType () const override
 
StringView getStrType () const override
 
ParserParameterBaseSPtr clone () const override
 
bool parse (LoggerInstance &logger, String &params) override
 Checks the parameter.
 
bool isSet () override
 
- Public Member Functions inherited from castor::ParserParameterBase
CU_API ParserParameterBase ()=default
 Constructor.
 
CU_API ParserParameterBase (ParserParameterBase const &)=default
 
CU_API ParserParameterBase (ParserParameterBase &&) noexcept=default
 
CU_API ParserParameterBaseoperator= (ParserParameterBase const &)=default
 
CU_API ParserParameterBaseoperator= (ParserParameterBase &&) noexcept=default
 
virtual CU_API ~ParserParameterBase () noexcept=default
 
virtual CU_API ParameterType getBaseType () const
 
template<typename T >
T const & get (T &value) const
 Retrieves the parameter value.
 
template<typename T >
get () const
 

Public Attributes

ValueType m_value {}
 
Range< ValueTypem_range
 
bool m_set {}
 

Detailed Description

template<ParameterType Type>
class castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >

Specified parser parameter.

Member Typedef Documentation

◆ ValueType

template<ParameterType Type>
using castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::ValueType = ParserParameterValueType< Type >

The parameter value type.

Constructor & Destructor Documentation

◆ ParserParameter() [1/4]

template<ParameterType Type>
castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::ParserParameter ( )
inline

Constructor.

◆ ParserParameter() [2/4]

template<ParameterType Type>
castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::ParserParameter ( ValueType rhs)
inlineexplicit

Constructor.

◆ ParserParameter() [3/4]

template<ParameterType Type>
castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::ParserParameter ( Range< ValueType > const & range)
inlineexplicit

Constructor.

Parameters
[in]rangeThe range to parse.

◆ ParserParameter() [4/4]

template<ParameterType Type>
castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::ParserParameter ( ValueType rhs,
Range< ValueType > const & range )
inlineexplicit

Constructor.

Parameters
[in]rhsThe value.
[in]rangeThe range to parse.

Member Function Documentation

◆ clone()

template<ParameterType Type>
ParserParameterBaseSPtr castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::clone ( ) const
inlineoverridevirtual

Returns
A copy of this parameter.

Implements castor::ParserParameterBase.

◆ getStrType()

template<ParameterType Type>
StringView castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::getStrType ( ) const
inlineoverridevirtual

Returns
The parameter string type.

Implements castor::ParserParameterBase.

◆ getType()

template<ParameterType Type>
ParameterType castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::getType ( ) const
inlineoverridevirtual

Returns
The parameter type.

Implements castor::ParserParameterBase.

◆ isSet()

template<ParameterType Type>
bool castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::isSet ( )
inlineoverridevirtual

Returns
false if the parameter is not set.

Implements castor::ParserParameterBase.

◆ parse()

template<ParameterType Type>
bool castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::parse ( LoggerInstance & logger,
String & params )
inlineoverridevirtual

Checks the parameter.

Parameters
[in,out]loggerThe logger instance.
[in,out]paramsThe text containing the parameter value.
Returns
false if any error occured.

Implements castor::ParserParameterBase.

Member Data Documentation

◆ m_range

template<ParameterType Type>
Range< ValueType > castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::m_range

The parameter value range.

◆ m_set

template<ParameterType Type>
bool castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::m_set {}

The parameter value.

◆ m_value

template<ParameterType Type>
ValueType castor::ParserParameter< Type, std::enable_if_t< IsArithmeticType< Type >::value > >::m_value {}

The parameter value.


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