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