OpenWalnut  1.4.0
WPropertyTypes.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WPROPERTYTYPES_H
26 #define WPROPERTYTYPES_H
27 
28 #include <stdint.h>
29 
30 #include <string>
31 #include <vector>
32 #include <utility>
33 
34 #ifndef Q_MOC_RUN
35 #include <boost/filesystem.hpp>
36 #endif
37 
38 #include "WStringUtils.h"
39 #include "math/linearAlgebra/WMatrixFixed.h"
40 #include "math/linearAlgebra/WPosition.h"
41 #include "math/linearAlgebra/WVectorFixed.h"
42 #include "math/WInterval.h"
43 #include "WAssert.h"
44 #include "WColor.h"
45 #include "WItemSelector.h"
46 
47 template < typename T >
49 class WPropertyGroup;
50 
51 class WTransferFunction;
52 
53 ////////////////////////////////////////////////////////////////////////////////////////////////////////
54 // NOTE: If you add new types here, please also add corresponding addProperty methods to WPropertyGroup
55 ////////////////////////////////////////////////////////////////////////////////////////////////////////
56 
57 ////////////////////////////////////////////////////////////////////////////////////////////////////////
58 // NOTE: Always use the WPVBaseTypes in all your declarations to allow easy type modifications later on
59 ////////////////////////////////////////////////////////////////////////////////////////////////////////
60 
61 /**
62  * Enum of all possible types, that can be used with WProperty.
63  */
64 typedef enum
65 {
66  PV_UNKNOWN, //!< type not known
67  PV_GROUP, //!< the group property
68  PV_INT, //!< integer value
69  PV_DOUBLE, //!< floating point value
70  PV_BOOL, //!< boolean
71  PV_STRING, //!< a string
72  PV_PATH, //!< a Boost Path object denoting a filename/path
73  PV_SELECTION, //!< a list of strings, selectable
74  PV_POSITION, //!< a position property
75  PV_COLOR, //!< a color property
76  PV_TRIGGER, //!< for triggering an event
77  PV_MATRIX4X4, //!< for 4x4 matrices
78  PV_TRANSFERFUNCTION, //!< for transfer function textures
79  PV_STRUCT, //!< for complex, structured properties (used by \ref WPropertyStruct)
80  PV_LIST, //!< for a dynamic list of properties of the same type (see \ref WPropertyList)
81  PV_INTERVAL //!< for defining intervals (min and max values)
82 }
83 PROPERTY_TYPE;
84 
85 /**
86  * Enum of all possible purpose of a property. The purpose describes which meaning a property has for the creator of it. A PP_PARAMETER is a
87  * property which is meant to be modified to adopt the behaviour of the module (or whomever has created it). A PP_INFORMATION is only an output
88  * from the creator who wants to inform the outside world about values, states or whatever.
89  */
90 typedef enum
91 {
92  PV_PURPOSE_INFORMATION, //!< information property not meant to be modified from someone (except the creating object)
93  PV_PURPOSE_PARAMETER //!< a parameter meant to be modified by others to manipulate the behaviour of the module (or whomever created
94  //!< the property)
95 }
96 PROPERTY_PURPOSE;
97 
98 /**
99  * Namespace containing all base types of the WPropertyVariables. Use these types instead of issuing int32_t, double, bool, ...
100  * directly. It also contains some user defined types including the needed operators.
101  *
102  * \note You can use only types which overwrite the << and >> operators!
103  */
104 namespace WPVBaseTypes
105 {
106  typedef int32_t PV_INT; //!< base type used for every WPVInt
107  typedef double PV_DOUBLE; //!< base type used for every WPVDouble
108  typedef bool PV_BOOL; //!< base type used for every WPVBool
109  typedef std::string PV_STRING; //!< base type used for every WPVString
110  typedef boost::filesystem::path PV_PATH; //!< base type used for every WPVFilename
111  typedef WItemSelector PV_SELECTION; //!< base type used for every WPVSelection
112  typedef WPosition PV_POSITION; //!< base type used for every WPVPosition
113  typedef WColor PV_COLOR; //!< base type used for every WPVColor
114  typedef WMatrix4d PV_MATRIX4X4; //!< base type used for every WPVMatrix4X4
115  typedef WTransferFunction PV_TRANSFERFUNCTION; //!< base type for every transfer function
116  typedef WIntervalDouble PV_INTERVAL; //!< base type used for every PV_INTERVAL
117 
118  /**
119  * Enum denoting the possible trigger states. It is used for trigger properties.
120  */
121  typedef enum
122  {
123  PV_TRIGGER_READY = 0, //!< Trigger property: is ready to be triggered (again)
124  PV_TRIGGER_TRIGGERED //!< Trigger property: got triggered
125  }
126  PV_TRIGGER; //!< base type used for every WPVTrigger
127 
128  /**
129  * Checks which property types are derived from \ref WPropertyGroupBase. This, for example, is true for PV_GROUP and PV_STRUCT.
130  *
131  * \param type the type to check.
132  *
133  * \return true if cast-able \ref WPropertyGroupBase.
134  */
135  bool isPropertyGroup( PROPERTY_TYPE type );
136 
137  /**
138  * Write a PV_TRIGGER in string representation to the given output stream.
139  *
140  * \param out the output stream to print the value to
141  * \param c the trigger value to output
142  *
143  * \return the output stream extended by the trigger value.
144  */
145  std::ostream& operator<<( std::ostream& out, const PV_TRIGGER& c );
146 
147  /**
148  * Write a PV_TRIGGER in string representation to the given input stream.
149  *
150  * \param in the input stream to read the value from
151  * \param c set the value red to this
152  *
153  * \return the input stream.
154  */
155  std::istream& operator>>( std::istream& in, PV_TRIGGER& c );
156 }
157 
158 /**
159  * Some convenience type alias for a even more easy usage of WPropertyVariable.
160  * These typedefs are useful for casts, as they alias the PropertyVariable types. Please use these types instead of directly
161  * int32_t, double, bool, ... so we are able to change the type later on without modifications of thousands of modules.
162  */
163 
164 /**
165  * Group properties.
166  */
167 typedef WPropertyGroup WPVGroup;
168 
169 /**
170  * Int properties.
171  */
173 
174 /**
175  * Floating point properties.
176  */
178 
179 /**
180  * Boolean properties.
181  */
183 
184 /**
185  * String properties.
186  */
188 
189 /**
190  * Filename properties.
191  */
193 
194 /**
195  * Selection properties
196  */
198 
199 /**
200  * position (vec3d) properties
201  */
203 
204 /**
205  * Color properties
206  */
208 
209 /**
210  * Trigger properties
211  */
213 
214 /**
215  * Trigger properties
216  */
218 
219 /**
220  * Transfer Function properties
221  */
223 
224 /**
225  * Interval properties
226  */
228 
229 /**
230  * Some convenience type alias for a even more easy usage of WPropertyVariable.
231  * These typdefs define some pointer alias.
232  */
233 
234 /**
235  * Alias for int32_t property variables.
236  */
237 typedef boost::shared_ptr< WPVInt > WPropInt;
238 
239 /**
240  * Alias for int32_t property variables.
241  */
242 typedef boost::shared_ptr< WPVDouble > WPropDouble;
243 
244 /**
245  * Alias for bool property variables.
246  */
247 typedef boost::shared_ptr< WPVBool > WPropBool;
248 
249 /**
250  * Alias for string property variables.
251  */
252 typedef boost::shared_ptr< WPVString > WPropString;
253 
254 /**
255  * Alias for filename property variables.
256  */
257 typedef boost::shared_ptr< WPVFilename > WPropFilename;
258 
259 /**
260  * Alias for string list property variables.
261  */
262 typedef boost::shared_ptr< WPVSelection > WPropSelection;
263 
264 /**
265  * Alias for position property variables.
266  */
267 typedef boost::shared_ptr< WPVPosition > WPropPosition;
268 
269 /**
270  * Alias for color property variables.
271  */
272 typedef boost::shared_ptr< WPVColor > WPropColor;
273 
274 /**
275  * Alias for the group properties.
276  */
277 typedef boost::shared_ptr< WPVGroup > WPropGroup;
278 
279 /**
280  * Alias for the trigger properties.
281  */
282 typedef boost::shared_ptr< WPVTrigger > WPropTrigger;
283 
284 /**
285  * Alias for the 4x4 matrix properties.
286  */
287 typedef boost::shared_ptr< WPVMatrix4X4 > WPropMatrix4X4;
288 
289 /**
290  * Alias for the transfer function properties
291  */
292 typedef boost::shared_ptr< WPVTransferFunction > WPropTransferFunction;
293 
294 /**
295  * Alias for the interval properties
296  */
297 typedef boost::shared_ptr< WPVInterval > WPropInterval;
298 
299 /**
300  * This namespace contains several helper classes which translate their template type to an enum.
301  */
302 namespace PROPERTY_TYPE_HELPER
303 {
304  /**
305  * Class helping to adapt types specified as template parameter into an enum.
306  */
307  template< typename T >
309  {
310  public:
311  /**
312  * Get type identifier of the template type T.
313  *
314  * \return type identifier-
315  */
316  PROPERTY_TYPE getType()
317  {
318  return PV_UNKNOWN;
319  }
320  };
321 
322  /**
323  * Class helping to create a new instance of the property content from an old one. This might be needed by some types (some need to have a
324  * predecessor for creation).
325  * You only need to specialize this class for types not allowing the direct use of string_utils::fromString
326  */
327  template< typename T >
329  {
330  public:
331  /**
332  * Creates a new instance of the type from a given string. Some classes need a predecessor which is also specified here.
333  *
334  * \param str the new value as string
335  *
336  * \return the new instance
337  */
338  T create( const T& /*old*/, const std::string str )
339  {
340  return string_utils::fromString< T >( str );
341  }
342 
343  /**
344  * Creates a string from the specified value.
345  *
346  * \param v the value to convert
347  *
348  * \return the string representation
349  */
350  std::string asString( const T& v )
351  {
352  return string_utils::toString( v );
353  }
354  };
355 
356  /**
357  * Class helping to adapt types specified as template parameter into an enum.
358  */
359  template<>
360  class WTypeIdentifier< WPVBaseTypes::PV_BOOL >
361  {
362  public:
363  /**
364  * Get type identifier of the template type T.
365  *
366  * \return type identifier-
367  */
368  PROPERTY_TYPE getType()
369  {
370  return PV_BOOL;
371  }
372  };
373 
374  /**
375  * Class helping to adapt types specified as template parameter into an enum.
376  */
377  template<>
378  class WTypeIdentifier< WPVBaseTypes::PV_INT >
379  {
380  public:
381  /**
382  * Get type identifier of the template type T.
383  *
384  * \return type identifier-
385  */
386  PROPERTY_TYPE getType()
387  {
388  return PV_INT;
389  }
390  };
391 
392  /**
393  * Class helping to adapt types specified as template parameter into an enum.
394  */
395  template<>
396  class WTypeIdentifier< WPVBaseTypes::PV_DOUBLE >
397  {
398  public:
399  /**
400  * Get type identifier of the template type T.
401  *
402  * \return type identifier-
403  */
404  PROPERTY_TYPE getType()
405  {
406  return PV_DOUBLE;
407  }
408  };
409 
410  /**
411  * Class helping to adapt types specified as template parameter into an enum.
412  */
413  template<>
414  class WTypeIdentifier< WPVBaseTypes::PV_STRING >
415  {
416  public:
417  /**
418  * Get type identifier of the template type T.
419  *
420  * \return type identifier-
421  */
422  PROPERTY_TYPE getType()
423  {
424  return PV_STRING;
425  }
426  };
427 
428  /**
429  * Class helping to adapt types specified as template parameter into an enum.
430  */
431  template<>
432  class WTypeIdentifier< WPVBaseTypes::PV_PATH >
433  {
434  public:
435  /**
436  * Get type identifier of the template type T.
437  *
438  * \return type identifier-
439  */
440  PROPERTY_TYPE getType()
441  {
442  return PV_PATH;
443  }
444  };
445 
446  /**
447  * Class helping to adapt types specified as template parameter into an enum.
448  */
449  template<>
450  class WTypeIdentifier< WPVBaseTypes::PV_SELECTION >
451  {
452  public:
453  /**
454  * Get type identifier of the template type T.
455  *
456  * \return type identifier-
457  */
458  PROPERTY_TYPE getType()
459  {
460  return PV_SELECTION;
461  }
462  };
463 
464  /**
465  * Class helping to create a new instance of the property content from an old one. Selections need this special care since they contain not
466  * serializable content which needs to be acquired from its predecessor instance.
467  */
468  template<>
469  class WStringConversion< WPVBaseTypes::PV_SELECTION >
470  {
471  public:
472  /**
473  * Creates a new instance of the type from a given string. Some classes need a predecessor which is also specified here.
474  *
475  * \param old the old value
476  * \param str the new value as string
477  *
478  * \return the new instance
479  */
480  WPVBaseTypes::PV_SELECTION create( const WPVBaseTypes::PV_SELECTION& old, const std::string str )
481  {
482  return old.newSelector( str );
483  }
484 
485  /**
486  * Creates a string from the specified value.
487  *
488  * \param v the value to convert
489  *
490  * \return the string representation
491  */
492  std::string asString( const WPVBaseTypes::PV_SELECTION& v )
493  {
494  return string_utils::toString( v );
495  }
496  };
497 
498  /**
499  * Class helping to adapt types specified as template parameter into an enum.
500  */
501  template<>
502  class WTypeIdentifier< WPVBaseTypes::PV_POSITION >
503  {
504  public:
505  /**
506  * Get type identifier of the template type T.
507  *
508  * \return type identifier-
509  */
510  PROPERTY_TYPE getType()
511  {
512  return PV_POSITION;
513  }
514  };
515 
516  /**
517  * Class helping to adapt types specified as template parameter into an enum.
518  */
519  template<>
520  class WTypeIdentifier< WPVBaseTypes::PV_COLOR >
521  {
522  public:
523  /**
524  * Get type identifier of the template type T.
525  *
526  * \return type identifier-
527  */
528  PROPERTY_TYPE getType()
529  {
530  return PV_COLOR;
531  }
532  };
533 
534  /**
535  * Class helping to adapt types specified as template parameter into an enum.
536  */
537  template<>
538  class WTypeIdentifier< WPVBaseTypes::PV_TRIGGER >
539  {
540  public:
541  /**
542  * Get type identifier of the template type T.
543  *
544  * \return type identifier-
545  */
546  PROPERTY_TYPE getType()
547  {
548  return PV_TRIGGER;
549  }
550  };
551 
552  /**
553  * Class helping to adapt types specified as template parameter into an enum.
554  */
555  template<>
556  class WTypeIdentifier< WPVBaseTypes::PV_MATRIX4X4 >
557  {
558  public:
559  /**
560  * Get type identifier of the template type T.
561  *
562  * \return type identifier-
563  */
564  PROPERTY_TYPE getType()
565  {
566  return PV_MATRIX4X4;
567  }
568  };
569 
570  /**
571  * Class helping to adapt types specified as template parameter into an enum.
572  */
573  template<>
574  class WTypeIdentifier< WPVBaseTypes::PV_INTERVAL >
575  {
576  public:
577  /**
578  * Get type identifier of the template type T.
579  *
580  * \return type identifier-
581  */
582  PROPERTY_TYPE getType()
583  {
584  return PV_INTERVAL;
585  }
586  };
587 
588  /**
589  * Class helping to create a new instance of the property content from an old one. Selections need this special care since they contain not
590  * serializable content which needs to be acquired from its predecessor instance.
591  */
592  template<>
593  class WStringConversion< WPVBaseTypes::PV_MATRIX4X4 >
594  {
595  public:
596  /**
597  * Creates a new instance of the type from a given string. Some classes need a predecessor which is also specified here.
598  *
599  * \param str the new value as string
600  *
601  * \return the new instance
602  */
603  WPVBaseTypes::PV_MATRIX4X4 create( const WPVBaseTypes::PV_MATRIX4X4& /*old*/, const std::string str )
604  {
605  WMatrix4d c;
606  std::vector< std::string > tokens;
607  tokens = string_utils::tokenize( str, ";" );
608  WAssert( tokens.size() >= 16, "There weren't 16 values for a 4x4 Matrix" );
609 
610  size_t idx = 0;
611  for( size_t row = 0; row < 4; ++row )
612  {
613  for( size_t col = 0; col < 4; ++col )
614  {
615  c( row, col ) = string_utils::fromString< double >( tokens[ idx ] );
616  idx++;
617  }
618  }
619 
620  return c;
621  }
622 
623  /**
624  * Creates a string from the specified value.
625  *
626  * \param v the value to convert
627  *
628  * \return the string representation
629  */
630  std::string asString( const WPVBaseTypes::PV_MATRIX4X4& v )
631  {
632  std::ostringstream out;
633  for( size_t row = 0; row < 4; ++row )
634  {
635  for( size_t col = 0; col < 4; ++col )
636  {
637  out << v( row, col ) << ";";
638  }
639  }
640  return out.str();
641  }
642  };
643 
644  /**
645  * Class helping to adapt types specified as template parameter into an enum.
646  */
647  template<>
648  class WTypeIdentifier< WPVBaseTypes::PV_TRANSFERFUNCTION >
649  {
650  public:
651  /**
652  * Get type identifier of the template type T.
653  *
654  * \return type identifier-
655  */
656  PROPERTY_TYPE getType()
657  {
658  return PV_TRANSFERFUNCTION;
659  }
660  };
661 
662  /**
663  * Class helping to create a new instance of the property content from an old one. Selections need this special care since they contain not
664  * serializable content which needs to be acquired from its predecessor instance.
665  */
666  template<>
667  class WStringConversion< WPVBaseTypes::PV_TRANSFERFUNCTION >
668  {
669  public:
670  /**
671  * Creates a new instance of the type from a given string. Some classes need a predecessor which is also specified here.
672  *
673  * \param str the new value as string
674  *
675  * \return the new instance
676  */
677  WPVBaseTypes::PV_TRANSFERFUNCTION create( const WPVBaseTypes::PV_TRANSFERFUNCTION& /*old*/, const std::string str );
678 
679  /**
680  * Creates a string from the specified value.
681  *
682  * \param tf the value to convert
683  *
684  * \return the string representation
685  */
686  std::string asString( const WPVBaseTypes::PV_TRANSFERFUNCTION& tf );
687  };
688 
689  /**
690  * Class helping to create a new instance of the property content from an old one. Selections need this special care since they contain not
691  * serializable content which needs to be acquired from its predecessor instance.
692  */
693  template<>
694  class WStringConversion< WPVBaseTypes::PV_POSITION >
695  {
696  public:
697  /**
698  * Creates a new instance of the type from a given string. Some classes need a predecessor which is also specified here.
699  *
700  * \param str the new value as string
701  *
702  * \return the new instance
703  */
704  WPVBaseTypes::PV_POSITION create( const WPVBaseTypes::PV_POSITION& /*old*/, const std::string str )
705  {
707  std::vector< std::string > tokens;
708  tokens = string_utils::tokenize( str, ";" );
709  WAssert( tokens.size() >= 3, "There weren't 3 values for a 3D vector" );
710 
711  size_t idx = 0;
712  for( size_t col = 0; col < 3; ++col )
713  {
714  c[ col ] = string_utils::fromString< double >( tokens[ idx ] );
715  idx++;
716  }
717  return c;
718  }
719 
720  /**
721  * Creates a string from the specified value.
722  *
723  * \param v the value to convert
724  *
725  * \return the string representation
726  */
727  std::string asString( const WPVBaseTypes::PV_POSITION& v )
728  {
729  std::ostringstream out;
730  for( size_t col = 0; col < 3; ++col )
731  {
732  out << v[ col ] << ";";
733  }
734  return out.str();
735  }
736  };
737 
738  /**
739  * Class helping to create a new instance of the property content from an old one. Selections need this special care since they contain not
740  * serializable content which needs to be acquired from its predecessor instance.
741  */
742  template<>
743  class WStringConversion< WPVBaseTypes::PV_INTERVAL >
744  {
745  public:
746  /**
747  * Creates a new instance of the type from a given string. Some classes need a predecessor which is also specified here.
748  *
749  * \param str the new value as string
750  *
751  * \return the new instance
752  */
753  WPVBaseTypes::PV_INTERVAL create( const WPVBaseTypes::PV_INTERVAL& /*old*/, const std::string str )
754  {
755  std::vector< std::string > tokens;
756  tokens = string_utils::tokenize( str, ";" );
757  WAssert( tokens.size() >= 2, "There weren't 2 values for an interval" );
758 
759  WPVBaseTypes::PV_INTERVAL c( string_utils::fromString< double >( tokens[ 0 ] ),
760  string_utils::fromString< double >( tokens[ 1 ] ) );
761 
762  return c;
763  }
764 
765  /**
766  * Creates a string from the specified value.
767  *
768  * \param v the value to convert
769  *
770  * \return the string representation
771  */
772  std::string asString( const WPVBaseTypes::PV_INTERVAL& v )
773  {
774  std::ostringstream out;
775  out << v.getLower() << ";" << v.getUpper();
776  return out.str();
777  }
778  };
779 }
780 
781 #endif // WPROPERTYTYPES_H
PROPERTY_TYPE getType()
Get type identifier of the template type T.
A class that stores a 1D transfer function which consists of a linear interpolation of alpha and colo...
WMatrix4d PV_MATRIX4X4
base type used for every WPVMatrix4X4
WIntervalDouble PV_INTERVAL
base type used for every PV_INTERVAL
WItemSelector PV_SELECTION
base type used for every WPVSelection
PROPERTY_TYPE getType()
Get type identifier of the template type T.
WTransferFunction PV_TRANSFERFUNCTION
base type for every transfer function
std::string asString(const WPVBaseTypes::PV_SELECTION &v)
Creates a string from the specified value.
std::string asString(const T &v)
Creates a string from the specified value.
int32_t PV_INT
base type used for every WPVInt
Trigger property: got triggered.
const T & getLower() const
Get the lower value of the interval.
Definition: WInterval.h:273
boost::filesystem::path PV_PATH
base type used for every WPVFilename
std::ostream & operator<<(std::ostream &out, const PV_TRIGGER &c)
Write a PV_TRIGGER in string representation to the given output stream.
PROPERTY_TYPE getType()
Get type identifier of the template type T.
std::vector< std::string > tokenize(const std::string &source, const std::string &delim=WHITESPACE, bool compress=true)
Splits the given string into a vector of strings (so called tokens).
PROPERTY_TYPE getType()
Get type identifier of the template type T.
PROPERTY_TYPE getType()
Get type identifier of the template type T.
T create(const T &, const std::string str)
Creates a new instance of the type from a given string.
Namespace containing all base types of the WPropertyVariables.
PROPERTY_TYPE getType()
Get type identifier of the template type T.
A named property class with a concrete type.
PROPERTY_TYPE getType()
Get type identifier of the template type T.
std::string asString(const WPVBaseTypes::PV_INTERVAL &v)
Creates a string from the specified value.
PROPERTY_TYPE getType()
Get type identifier of the template type T.
This only is a 3d double vector.
WPVBaseTypes::PV_SELECTION create(const WPVBaseTypes::PV_SELECTION &old, const std::string str)
Creates a new instance of the type from a given string.
double PV_DOUBLE
base type used for every WPVDouble
Basic class for encapsulating a std::pair to be interpreted as interval.
Definition: WInterval.h:44
PROPERTY_TYPE getType()
Get type identifier of the template type T.
PROPERTY_TYPE getType()
Get type identifier of the template type T.
Class to manage properties of an object and to provide convenience methods for easy access and manipu...
std::string PV_STRING
base type used for every WPVString
bool isPropertyGroup(PROPERTY_TYPE type)
Checks which property types are derived from WPropertyGroupBase.
WItemSelector newSelector(IndexList selected) const
Creates a new valid instance with the specified items selected.
This class represents a subset of a WItemSelection.
Definition: WItemSelector.h:56
std::string toString(const T &value)
Convert a given value to a string.
Definition: WStringUtils.h:120
PROPERTY_TYPE getType()
Get type identifier of the template type T.
WPVBaseTypes::PV_POSITION create(const WPVBaseTypes::PV_POSITION &, const std::string str)
Creates a new instance of the type from a given string.
PROPERTY_TYPE getType()
Get type identifier of the template type T.
PV_TRIGGER
Enum denoting the possible trigger states.
WPVBaseTypes::PV_INTERVAL create(const WPVBaseTypes::PV_INTERVAL &, const std::string str)
Creates a new instance of the type from a given string.
bool PV_BOOL
base type used for every WPVBool
WColor PV_COLOR
base type used for every WPVColor
Class helping to create a new instance of the property content from an old one.
const T & getUpper() const
Return the upper value of the interval.
Definition: WInterval.h:279
std::istream & operator>>(std::istream &in, PV_TRIGGER &c)
Write a PV_TRIGGER in string representation to the given input stream.
std::string asString(const WPVBaseTypes::PV_MATRIX4X4 &v)
Creates a string from the specified value.
WPVBaseTypes::PV_MATRIX4X4 create(const WPVBaseTypes::PV_MATRIX4X4 &, const std::string str)
Creates a new instance of the type from a given string.
Class helping to adapt types specified as template parameter into an enum.
This namespace contains several helper classes which translate their template type to an enum...
PROPERTY_TYPE getType()
Get type identifier of the template type T.
Trigger property: is ready to be triggered (again)
std::string asString(const WPVBaseTypes::PV_POSITION &v)
Creates a string from the specified value.
WPosition PV_POSITION
base type used for every WPVPosition