OpenWalnut  1.3.1
Public Types | Public Member Functions | Static Private Attributes | Friends | List of all members
WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > Class Template Reference

This is a property which encapsulates a given, fixed number of other properties. More...

#include <WPropertyStruct.h>

+ Inheritance diagram for WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >:

Public Types

typedef WPropertyStruct
< BOOST_PP_ENUM_PARAMS(10, T) > 
WPropertyStructType
 The type of this template instantiation. More...
 
typedef boost::shared_ptr
< WPropertyStructType
SPtr
 Convenience typedef for a boost::shared_ptr< WPropertyStructType > More...
 
typedef boost::shared_ptr
< const WPropertyStructType
ConstSPtr
 Convenience typedef for a boost::shared_ptr< const WPropertyStructType > More...
 
typedef
WPropertyStructHelper::AsVector
< BOOST_PP_ENUM_PARAMS(10, T) >
::type 
TypeVector
 The boost mpl vector for all the types specified. More...
 
typedef
WPropertyStructHelper::SequenceToTuple
< TypeVector >::type 
TupleType
 The type vector as a boost tuple. More...
 
- Public Types inherited from WPropertyGroupBase
typedef std::vector
< boost::shared_ptr
< WPropertyBase > > 
PropertyContainerType
 For shortening: a type defining a shared vector of WSubject pointers. More...
 
typedef
WSharedSequenceContainer
< PropertyContainerType
PropertySharedContainerType
 The alias for a shared container. More...
 
typedef
PropertyContainerType::const_iterator 
PropertyConstIterator
 The const iterator type of the container. More...
 
typedef
PropertyContainerType::iterator 
PropertyIterator
 The iterator type of the container. More...
 
typedef boost::shared_ptr
< WPropertyGroupBase
SPtr
 Convenience typedef for a boost::shared_ptr< WPropertyGroupBase >. More...
 
typedef boost::shared_ptr
< const WPropertyGroupBase
ConstSPtr
 Convenience typedef for a boost::shared_ptr< const WPropertyGroupBase >. More...
 
- Public Types inherited from WPropertyBase
typedef boost::shared_ptr
< WPropertyBase
SPtr
 Convenience typedef for a boost::shared_ptr< WPropertyBase > More...
 
typedef boost::shared_ptr
< const WPropertyBase
ConstSPtr
 Convenience typedef for a boost::shared_ptr< const WPropertyBase > More...
 
typedef boost::function< void(boost::shared_ptr
< WPropertyBase >)> 
PropertyChangeNotifierType
 Signal signature emitted during set operations. More...
 

Public Member Functions

 WPropertyStruct (std::string name, std::string description)
 Create an empty named property. More...
 
 WPropertyStruct (const WPropertyStructType &from)
 Copy constructor. More...
 
virtual ~WPropertyStruct ()
 Destructor. More...
 
template<int N>
boost::mpl::at< TypeVector,
boost::mpl::size_t< N >
>::type 
getProperty ()
 Get the N'th property in the struct. More...
 
template<int N>
boost::mpl::at< TypeVector,
boost::mpl::size_t< N >
>::type::element_type::ConstSPtr 
getProperty () const
 Get the N'th property in the struct. More...
 
const WPropertyBase::SPtrgetProperty (size_t n) const
 Returns the property with the given number, but only as base type. More...
 
WPropertyBase::SPtr getProperty (size_t n)
 Returns the property with the given number, but only as base type. More...
 
size_t size () const
 The size of the WPropertyStruct. More...
 
virtual WPropertyBase::SPtr clone ()
 This method clones a property and returns the clone. More...
 
virtual PROPERTY_TYPE getType () const
 Gets the real WPropertyVariable type of this instance. More...
 
virtual bool setAsString (std::string value)
 This methods allows properties to be set by a string value. More...
 
virtual std::string getAsString ()
 Returns the current value as a string. More...
 
virtual bool set (boost::shared_ptr< WPropertyBase > value, bool recommendedOnly=false)
 Sets the value from the specified property to this one. More...
 
- Public Member Functions inherited from WPropertyGroupBase
 WPropertyGroupBase (std::string name, std::string description)
 Constructor. More...
 
 WPropertyGroupBase (const WPropertyGroupBase &from)
 Copy constructor. More...
 
virtual ~WPropertyGroupBase ()
 Destructor. More...
 
virtual bool existsProperty (std::string name)
 Helper function that finds a property by its name. More...
 
virtual boost::shared_ptr
< WPropertyBase
getProperty (std::string name)
 Function searches the property. More...
 
virtual
PropertySharedContainerType::ReadTicket 
getProperties () const
 Returns a read ticket for read-access to the list of properties. More...
 
virtual
PropertySharedContainerType::ReadTicket 
getReadTicket () const
 Returns an read ticket for the properties. More...
 
virtual boost::shared_ptr
< WPropertyBase
findProperty (std::string name) const
 Searches the property with a given name. More...
 
- Public Member Functions inherited from WPropertyBase
 WPropertyBase (std::string name, std::string description)
 Create an empty named property. More...
 
 WPropertyBase (const WPropertyBase &from)
 Copy constructor. More...
 
virtual ~WPropertyBase ()
 Destructor. More...
 
std::string getName () const
 Gets the name of the class. More...
 
std::string getDescription () const
 Gets the description of the property. More...
 
bool isHidden () const
 Determines whether the property is hidden or not. More...
 
void setHidden (bool hidden=true)
 Sets the property hidden. More...
 
virtual PROPERTY_PURPOSE getPurpose () const
 Gets the purpose of a property. More...
 
virtual void setPurpose (PROPERTY_PURPOSE purpose)
 Sets the purpose of the property. More...
 
virtual boost::shared_ptr
< WCondition
getUpdateCondition () const
 This method returns a condition which gets fired whenever the property changes somehow. More...
 
WPropInt toPropInt ()
 Helper converts this instance to its native type. More...
 
WPropDouble toPropDouble ()
 Helper converts this instance to its native type. More...
 
WPropBool toPropBool ()
 Helper converts this instance to its native type. More...
 
WPropString toPropString ()
 Helper converts this instance to its native type. More...
 
WPropFilename toPropFilename ()
 Helper converts this instance to its native type. More...
 
WPropSelection toPropSelection ()
 Helper converts this instance to its native type. More...
 
WPropColor toPropColor ()
 Helper converts this instance to its native type. More...
 
WPropPosition toPropPosition ()
 Helper converts this instance to its native type. More...
 
WPropTrigger toPropTrigger ()
 Helper converts this instance to its native type. More...
 
WPropMatrix4X4 toPropMatrix4X4 ()
 Helper converts this instance to its native type. More...
 
WPropTransferFunction toPropTransferFunction ()
 Helper converts this instance to its native type. More...
 
WPropGroup toPropGroup ()
 Helper converts this instance to its native type. More...
 
boost::shared_ptr
< WPropertyGroupBase
toPropGroupBase ()
 Convert the property to a WPropertyGroupBase. More...
 
template<typename T >
boost::shared_ptr
< WPropertyVariable< T > > 
toPropertyVariable ()
 Helper converts this instance to an arbitrary type. More...
 

Static Private Attributes

static const size_t m_size = boost::mpl::size< TypeVector >::value
 How many elements are in this WPropertyStruct? More...
 

Friends

class WPropertyStructTest
 

Additional Inherited Members

- Protected Types inherited from WPropertyBase
typedef
boost::signals2::signal< void(boost::shared_ptr
< WPropertyBase >)> 
PropertyChangeSignalType
 Signal used for firing change signals. More...
 
- Protected Member Functions inherited from WPropertyGroupBase
virtual boost::shared_ptr
< WPropertyBase
findProperty (const WPropertyGroupBase *const props, std::string name) const
 Helping function to find a property inside a specific group. More...
 
bool propNamePredicate (boost::shared_ptr< WPropertyBase > prop1, boost::shared_ptr< WPropertyBase > prop2) const
 Compares the names of two properties and returns true if they are equal. More...
 
void addArbitraryProperty (WPropertyBase::SPtr prop)
 Insert the specified property into the list. More...
 
- Protected Attributes inherited from WPropertyGroupBase
PropertySharedContainerType m_properties
 The set of proerties. More...
 

Detailed Description

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
class WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >

This is a property which encapsulates a given, fixed number of other properties.

You can specify up to 10 properties. This can be seen similar to the "struct" in the C++ language. A WPropertyStruct can basically seen as WPropertyGroup, but is different in a certain way: it is fixed size (defined on compile time), it allows getting each property with their correct type and provides the appearance as if this property is only ONE object and not a group of multiple objects.

Notes:
the limitation to 10 types is due to the boost::tuple. If you need more, you need to replace the tuple type as storage-backend.
Notes:
if we use C++11 some day, we could use variadic templates here.
Template Parameters
T0first type. Mandatory.
T1additional type. Optional.
T2additional type. Optional.
T3additional type. Optional.
T4additional type. Optional.
T5additional type. Optional.
T6additional type. Optional.
T7additional type. Optional.
T8additional type. Optional.
T9additional type. Optional.

Definition at line 199 of file WPropertyStruct.h.

Member Typedef Documentation

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
typedef boost::shared_ptr< const WPropertyStructType > WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::ConstSPtr

Convenience typedef for a boost::shared_ptr< const WPropertyStructType >

Definition at line 216 of file WPropertyStruct.h.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
typedef boost::shared_ptr< WPropertyStructType > WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::SPtr

Convenience typedef for a boost::shared_ptr< WPropertyStructType >

Definition at line 211 of file WPropertyStruct.h.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
typedef WPropertyStructHelper::SequenceToTuple< TypeVector >::type WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::TupleType

The type vector as a boost tuple.

Definition at line 226 of file WPropertyStruct.h.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
typedef WPropertyStructHelper::AsVector< BOOST_PP_ENUM_PARAMS( 10, T ) >::type WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::TypeVector

The boost mpl vector for all the types specified.

Definition at line 221 of file WPropertyStruct.h.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
typedef WPropertyStruct< BOOST_PP_ENUM_PARAMS( 10, T ) > WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::WPropertyStructType

The type of this template instantiation.

Definition at line 206 of file WPropertyStruct.h.

Constructor & Destructor Documentation

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::WPropertyStruct ( std::string  name,
std::string  description 
)
inline

Create an empty named property.

Parameters
namethe name of the property
descriptionthe description of the property

Definition at line 234 of file WPropertyStruct.h.

References WPropertyGroupBase::PropertyCreatorAndGroupAdder< PropertyType >::createAndAdd().

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::WPropertyStruct ( const WPropertyStructType from)
inlineexplicit

Copy constructor.

Creates a deep copy of this property. As boost::signals2 and condition variables are non-copyable, new instances get created. The subscriptions to a signal are LOST as well as all listeners to a condition.

Parameters
fromthe instance to copy.

Definition at line 256 of file WPropertyStruct.h.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
virtual WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::~WPropertyStruct ( )
inlinevirtual

Destructor.

Definition at line 265 of file WPropertyStruct.h.

Member Function Documentation

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
virtual WPropertyBase::SPtr WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::clone ( )
inlinevirtual

This method clones a property and returns the clone.

It does a deep copy and, in contrast to a copy constructor, creates property with the correct type without explicitly requiring the user to specify it. It creates a NEW change condition and change signal. This means, alls subscribed signal handlers are NOT copied.

Notes:
this simply ensures the copy constructor of the runtime type is issued.
Returns
the deep clone of this property.

Implements WPropertyBase.

Definition at line 351 of file WPropertyStruct.h.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
virtual std::string WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getAsString ( )
inlinevirtual

Returns the current value as a string.

This is useful for debugging or project files. It is not implemented as << operator, since the << should also print min/max constraints and so on. This simply is the value.

Returns
the value as a string.

Implements WPropertyBase.

Definition at line 403 of file WPropertyStruct.h.

References WSharedObject< T >::getReadTicket(), WPropertyGroupBase::m_properties, and WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::size().

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
template<int N>
boost::mpl::at< TypeVector, boost::mpl::size_t< N > >::type WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getProperty ( )
inline

Get the N'th property in the struct.

Template Parameters
Nthe number of the property to get.
Returns
the property.

Definition at line 278 of file WPropertyStruct.h.

Referenced by WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getProperty().

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
template<int N>
boost::mpl::at< TypeVector, boost::mpl::size_t< N > >::type::element_type::ConstSPtr WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getProperty ( ) const
inline

Get the N'th property in the struct.

Template Parameters
Nthe number of the property to get.
Returns
the property.

Definition at line 292 of file WPropertyStruct.h.

References WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getProperty().

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
const WPropertyBase::SPtr& WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getProperty ( size_t  n) const
inline

Returns the property with the given number, but only as base type.

The advantage is that the property number can be specified during runtime.

Parameters
nthe number of the property
Returns
the property

Definition at line 306 of file WPropertyStruct.h.

References WSharedObject< T >::getReadTicket(), and WPropertyGroupBase::m_properties.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
WPropertyBase::SPtr WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getProperty ( size_t  n)
inline

Returns the property with the given number, but only as base type.

The advantage is that the property number can be specified during runtime.

Parameters
nthe number of the property
Returns
the property

Definition at line 321 of file WPropertyStruct.h.

References WSharedObject< T >::getReadTicket(), and WPropertyGroupBase::m_properties.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
virtual PROPERTY_TYPE WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::getType ( ) const
inlinevirtual

Gets the real WPropertyVariable type of this instance.

Returns
the real type.

Reimplemented from WPropertyBase.

Definition at line 362 of file WPropertyStruct.h.

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
virtual bool WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::set ( boost::shared_ptr< WPropertyBase value,
bool  recommendedOnly = false 
)
inlinevirtual

Sets the value from the specified property to this one.

This is especially useful to copy a value without explicitly casting/knowing the dynamic type of the property.

Parameters
valuethe new value.
recommendedOnlyif true, property types which support recommended values apply the given value as recommendation.
Returns
true if the value has been accepted.

Implements WPropertyBase.

Definition at line 428 of file WPropertyStruct.h.

References WSharedObject< T >::getReadTicket(), WPropertyGroupBase::m_properties, and WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::size().

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
virtual bool WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::setAsString ( std::string  value)
inlinevirtual

This methods allows properties to be set by a string value.

This is especially useful when a property is only available as string and the real type of the property is unknown. This is a shortcut for casting the property and then setting the lexically casted value.

Parameters
valuethe new value to set.
Returns
true if value could be set.

Implements WPropertyBase.

Definition at line 375 of file WPropertyStruct.h.

References WSharedObject< T >::getReadTicket(), WPropertyGroupBase::m_properties, WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::size(), and string_utils::tokenize().

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
size_t WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::size ( ) const
inline

Member Data Documentation

template<typename T0, typename T1 = WPropertyStructHelper::NOTYPE, typename T2 = WPropertyStructHelper::NOTYPE, typename T3 = WPropertyStructHelper::NOTYPE, typename T4 = WPropertyStructHelper::NOTYPE, typename T5 = WPropertyStructHelper::NOTYPE, typename T6 = WPropertyStructHelper::NOTYPE, typename T7 = WPropertyStructHelper::NOTYPE, typename T8 = WPropertyStructHelper::NOTYPE, typename T9 = WPropertyStructHelper::NOTYPE>
const size_t WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::m_size = boost::mpl::size< TypeVector >::value
staticprivate

How many elements are in this WPropertyStruct?

Definition at line 456 of file WPropertyStruct.h.

Referenced by WPropertyStruct< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::size().


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