OpenWalnut
1.4.0
|
This is a WGEShaderDefineOptions class which additionally uses a property to automatically control the active options. More...
#include <WGEShaderPropertyDefineOptions.h>
Public Types | |
typedef boost::shared_ptr < WGEShaderPropertyDefineOptions > | SPtr |
Convenience typedef for a boost_shared_ptr< WGEShaderPropertyDefineOptions >. | |
typedef boost::shared_ptr < const WGEShaderPropertyDefineOptions > | ConstSPtr |
Convenience typedef for a boost_shared_ptr< const WGEShaderPropertyDefineOptions >. | |
Public Member Functions | |
WGEShaderPropertyDefineOptions (PropType prop, std::string first, std::string option2="", std::string option3="", std::string option4="", std::string option5="", std::string option6="", std::string option7="", std::string option8="", std::string option9="", std::string option10="") | |
Create a new instance of this class. | |
WGEShaderPropertyDefineOptions (PropType prop, std::vector< std::string > options) | |
Create a new instance of this class. | |
virtual | ~WGEShaderPropertyDefineOptions () |
Destructor. | |
PropType | getProperty () const |
Returns the property associated with this instance. | |
Private Member Functions | |
void | propUpdated () |
Called by the property update mechanism. | |
Private Attributes | |
PropType | m_property |
The property controlling this instance and the active options list. | |
boost::signals2::connection | m_connection |
The connection associated with the properties update condition. |
This is a WGEShaderDefineOptions class which additionally uses a property to automatically control the active options.
This is very useful if you have some WPropInt or WPropSelection which controls some features in your shader. Especially with WPropSelection Instances, you can even activate multiple options if your selection allows this ( see WPropertyVariable<>::PropertyConstraint for details ). If used with a WPropBool, it is useful to switch on/off an option for example.
Definition at line 55 of file WGEShaderPropertyDefineOptions.h.
typedef boost::shared_ptr< const WGEShaderPropertyDefineOptions > WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::ConstSPtr |
Convenience typedef for a boost_shared_ptr< const WGEShaderPropertyDefineOptions >.
Reimplemented from WGEShaderDefineOptions.
Definition at line 66 of file WGEShaderPropertyDefineOptions.h.
typedef boost::shared_ptr< WGEShaderPropertyDefineOptions > WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::SPtr |
Convenience typedef for a boost_shared_ptr< WGEShaderPropertyDefineOptions >.
Reimplemented from WGEShaderDefineOptions.
Definition at line 61 of file WGEShaderPropertyDefineOptions.h.
WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::WGEShaderPropertyDefineOptions | ( | PropType | prop, |
std::string | first, | ||
std::string | option2 = "" , |
||
std::string | option3 = "" , |
||
std::string | option4 = "" , |
||
std::string | option5 = "" , |
||
std::string | option6 = "" , |
||
std::string | option7 = "" , |
||
std::string | option8 = "" , |
||
std::string | option9 = "" , |
||
std::string | option10 = "" |
||
) |
Create a new instance of this class.
The first option is mandatory and is set as default. The specified property controls the activations.
prop | the property controlling this thing. |
first | fist option. Is default. |
option2 | another option |
option3 | another option |
option4 | another option |
option5 | another option |
option6 | another option |
option7 | another option |
option8 | another option |
option9 | another option |
option10 | another option |
Definition at line 210 of file WGEShaderPropertyDefineOptions.h.
References WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::m_connection, WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::m_property, and WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::propUpdated().
WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::WGEShaderPropertyDefineOptions | ( | PropType | prop, |
std::vector< std::string > | options | ||
) |
Create a new instance of this class.
The first option is mandatory and is set as default. The specified property controls the activations.
prop | the property controlling this thing. |
options | the list of options. Must have a size greater 0. |
Definition at line 225 of file WGEShaderPropertyDefineOptions.h.
References WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::m_connection, WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::m_property, and WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::propUpdated().
WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::~WGEShaderPropertyDefineOptions | ( | ) | [virtual] |
Destructor.
Definition at line 237 of file WGEShaderPropertyDefineOptions.h.
PropType WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::getProperty | ( | ) | const |
Returns the property associated with this instance.
Definition at line 251 of file WGEShaderPropertyDefineOptions.h.
void WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::propUpdated | ( | ) | [private] |
Called by the property update mechanism.
This handles the new value in the property.
Definition at line 244 of file WGEShaderPropertyDefineOptions.h.
Referenced by WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::WGEShaderPropertyDefineOptions().
boost::signals2::connection WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::m_connection [private] |
The connection associated with the properties update condition.
Definition at line 120 of file WGEShaderPropertyDefineOptions.h.
Referenced by WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::WGEShaderPropertyDefineOptions().
PropType WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::m_property [private] |
The property controlling this instance and the active options list.
Definition at line 115 of file WGEShaderPropertyDefineOptions.h.
Referenced by WGEShaderPropertyDefineOptions< PropType, PropIndexAdapter >::WGEShaderPropertyDefineOptions().