OpenWalnut  1.5.0dev
WPropertyGroup.cpp
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 #include <algorithm>
26 #include <iostream>
27 #include <map>
28 #include <memory>
29 #include <string>
30 #include <vector>
31 
32 #include <boost/tokenizer.hpp>
33 
34 #include "WLogger.h"
35 #include "WPropertyGroup.h"
36 #include "WPropertyHelper.h"
37 #include "exceptions/WPropertyUnknown.h"
38 
39 WPropertyGroup::WPropertyGroup( std::string name, std::string description ):
40  WPropertyGroupBase( name, description )
41 {
42  // an empty list is automatically configured for us in WPropertyGroupBase
43 }
44 
46 {
47  // clean up
48 }
49 
51  WPropertyGroupBase( from )
52 {
53  // an exact (deep) copy already is generated by WPropertyGroupBase. We do not have any additional members
54 }
55 
56 std::shared_ptr< WPropertyBase > WPropertyGroup::clone()
57 {
58  // class copy constructor.
59  return std::shared_ptr< WPropertyGroup >( new WPropertyGroup( *this ) );
60 }
61 
62 PROPERTY_TYPE WPropertyGroup::getType() const
63 {
64  return PV_GROUP;
65 }
66 
67 bool WPropertyGroup::setAsString( std::string /*value*/ )
68 {
69  // groups can't be set in any way. -> ignore it.
70  return true;
71 }
72 
74 {
75  // groups can't be set in any way. -> ignore it.
76  return "";
77 }
78 
79 /**
80  * Add the default constraints for a certain type of property. By default, nothing is added.
81  *
82  * \note Information properties never get constraints by default
83  *
84  * \param prop the property
85  *
86  * \return the property inserted gets returned.
87  */
88 template< typename T >
89 T _addDefaultConstraints( T prop )
90 {
91  return prop;
92 }
93 
94 /**
95  * Add the default constraints for a certain type of property. For selections, the PC_ISVALID constraint is added.
96  *
97  * \note Information properties never get constraints by default
98  *
99  * \param prop the property
100  *
101  * \return the property inserted gets returned.
102  */
103 WPropSelection _addDefaultConstraints( WPropSelection prop )
104 {
106  return prop;
107 }
108 
109 /**
110  * Add the default constraints for a certain type of property. For filenames, the PC_NOTEMPTY constraint is added.
111  *
112  * \note Information properties never get constraints by default
113  *
114  * \param prop the property
115  *
116  * \return the property inserted gets returned.
117  */
118 WPropFilename _addDefaultConstraints( WPropFilename prop )
119 {
121  return prop;
122 }
123 
124 /**
125  * Add the default constraints for a certain type of property. Please specialize _addDefaultConstraints for your special needs and prop types.
126  *
127  * \note Information properties never get constraints by default
128  *
129  * \param prop the property to add the constraints to
130  *
131  * \return the property inserted
132  */
133 template< typename T >
134 T addDefaultConstraints( T prop )
135 {
136  if( prop->getPurpose() == PV_PURPOSE_INFORMATION )
137  {
138  return prop;
139  }
140 
141  return _addDefaultConstraints( prop );
142 }
143 
144 bool WPropertyGroup::set( std::shared_ptr< WPropertyBase > value, bool recommendedOnly )
145 {
146  // is this the same type as we are?
147  WPropertyGroup::SPtr v = std::dynamic_pointer_cast< WPropertyGroup >( value );
148  if( !v )
149  {
150  // it is not a WPropertyStruct with the same type
151  return false;
152  }
153 
154  // forward, use empty exclude list
155  return set( v, std::vector< std::string >(), recommendedOnly );
156 }
157 
158 bool WPropertyGroup::set( std::shared_ptr< WPropertyGroup > value, std::vector< std::string > exclude, bool recommendedOnly )
159 {
160  return setImpl( value, "", exclude, recommendedOnly );
161 }
162 
163 bool WPropertyGroup::setImpl( std::shared_ptr< WPropertyGroup > value, std::string path, std::vector< std::string > exclude, bool recommendedOnly )
164 {
165  // go through each of the given child props
167  size_t c = 0; // number of props we have set
168  for( WPropertyGroupBase::PropertyConstIterator it = r->get().begin(); it != r->get().end(); ++it )
169  {
170  // do we have a property named the same as in the source props?
171  WPropertyBase::SPtr prop = findProperty( ( *it )->getName() );
172  if( !prop )
173  {
174  // not found. Ignore it. We cannot set the target property as the source did not exist
175  continue;
176  }
177 
178  // ok there it is. check exclude list.
179  // first: use the current property name and append it to path
180  std::string completePath = path + WPropertyGroupBase::separator + ( *it )->getName();
181  if( path == "" )
182  {
183  // no separator if the path is empty now
184  completePath = ( *it )->getName();
185  }
186 
187  // now check exclude list
188  if( std::find( exclude.begin(), exclude.end(), completePath ) != exclude.end() )
189  {
190  // it is excluded
191  continue;
192  }
193 
194  // not excluded. Is it a group or something else?
195  WPropertyGroup::SPtr meAsGroup = std::dynamic_pointer_cast< WPropertyGroup >( prop );
196  WPropertyGroup::SPtr inputAsGroup = std::dynamic_pointer_cast< WPropertyGroup >( *it );
197  if( inputAsGroup && meAsGroup )
198  {
199  // not excluded and is group, recurse:
200  c += meAsGroup->setImpl( inputAsGroup, completePath, exclude, recommendedOnly );
201  }
202  else if( inputAsGroup || meAsGroup ) // one group and one not a group, skip
203  {
204  continue;
205  }
206  else
207  {
208  c += prop->set( *it, recommendedOnly );
209  }
210  }
211 
212  // success only if all props have been set
213  // NOTE: it think this only will ever be correct if we have no nested groups ...
214  return ( c == r->get().size() );
215 }
216 
217 void WPropertyGroup::removeProperty( std::shared_ptr< WPropertyBase > prop )
218 {
219  if( !prop )
220  {
221  return;
222  }
223 
224  // lock, unlocked if l looses focus
226  l->get().erase( std::remove( l->get().begin(), l->get().end(), prop ), l->get().end() );
227  m_updateCondition->remove( prop->getUpdateCondition() );
228 }
229 
230 WPropGroup WPropertyGroup::addPropertyGroup( std::string name, std::string description, bool hide )
231 {
232  WPropGroup p = WPropGroup( new WPropertyGroup( name, description ) );
233  p->setHidden( hide );
234  addProperty( p );
235  return p;
236 }
237 
239 {
240  // lock, unlocked if l looses focus
242  l->get().clear();
243 }
244 
245 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
246 // convenience methods for
247 // template< typename T>
248 // std::shared_ptr< WPropertyVariable< T > > addProperty( std::string name, std::string description, const T& initial, bool hide = false );
249 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
250 
251 WPropBool WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial, bool hide )
252 {
253  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, hide ) );
254 }
255 
256 WPropInt WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial, bool hide )
257 {
258  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_INT >( name, description, initial, hide ) );
259 }
260 
261 WPropDouble WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial, bool hide )
262 {
263  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_DOUBLE >( name, description, initial, hide ) );
264 }
265 
266 WPropString WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial, bool hide )
267 {
268  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, hide ) );
269 }
270 
271 WPropFilename WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial, bool hide )
272 {
273  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_PATH >( name, description, initial, hide ) );
274 }
275 
276 WPropSelection WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial, bool hide )
277 {
278  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, hide ) );
279 }
280 
281 WPropPosition WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial, bool hide )
282 {
283  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, hide ) );
284 }
285 
286 WPropColor WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial, bool hide )
287 {
288  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_COLOR >( name, description, initial, hide ) );
289 }
290 
291 WPropTrigger WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER& initial, bool hide )
292 {
293  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_TRIGGER >( name, description, initial, hide ) );
294 }
295 
296 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
297 // convenience methods for
298 // template< typename T>
299 // std::shared_ptr< WPropertyVariable< T > > addProperty( std::string name, std::string description, const T& initial,
300 // std::shared_ptr< WCondition > condition, bool hide = false );
301 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
302 
303 WPropBool WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
304  std::shared_ptr< WCondition > condition, bool hide )
305 {
306  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, condition, hide ) );
307 }
308 
309 WPropInt WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
310  std::shared_ptr< WCondition > condition, bool hide )
311 {
312  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_INT >( name, description, initial, condition, hide ) );
313 }
314 
315 WPropDouble WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
316  std::shared_ptr< WCondition > condition, bool hide )
317 {
318  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_DOUBLE >( name, description, initial, condition, hide ) );
319 }
320 
321 WPropString WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
322  std::shared_ptr< WCondition > condition, bool hide )
323 {
324  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, condition, hide ) );
325 }
326 
327 WPropFilename WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
328  std::shared_ptr< WCondition > condition, bool hide )
329 {
330  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_PATH >( name, description, initial, condition, hide ) );
331 }
332 
333 WPropSelection WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
334  std::shared_ptr< WCondition > condition, bool hide )
335 {
336  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, condition, hide ) );
337 }
338 
339 WPropPosition WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
340  std::shared_ptr< WCondition > condition, bool hide )
341 {
342  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, condition, hide ) );
343 }
344 
345 WPropColor WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
346  std::shared_ptr< WCondition > condition, bool hide )
347 {
348  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_COLOR >( name, description, initial, condition, hide ) );
349 }
350 
351 WPropTrigger WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER& initial,
352  std::shared_ptr< WCondition > condition, bool hide )
353 {
354  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_TRIGGER >( name, description, initial, condition, hide ) );
355 }
356 
357 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
358 // convenience methods for
359 // template< typename T>
360 // std::shared_ptr< WPropertyVariable< T > > addProperty( std::string name, std::string description, const T& initial,
361 // WPropertyBase::PropertyChangeNotifierType notifier, bool hide = false );
362 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
363 
364 WPropBool WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
365  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
366 {
367  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, notifier, hide ) );
368 }
369 
370 WPropInt WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
371  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
372 {
373  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_INT >( name, description, initial, notifier, hide ) );
374 }
375 
376 WPropDouble WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
377  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
378 {
379  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_DOUBLE >( name, description, initial, notifier, hide ) );
380 }
381 
382 WPropString WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
383  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
384 {
385  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, notifier, hide ) );
386 }
387 
388 WPropFilename WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
389  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
390 {
391  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_PATH >( name, description, initial, notifier, hide ) );
392 }
393 
394 WPropSelection WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
395  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
396 {
397  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, notifier, hide ) );
398 }
399 
400 WPropPosition WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
401  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
402 {
403  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, notifier, hide ) );
404 }
405 
406 WPropColor WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
407  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
408 {
409  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_COLOR >( name, description, initial, notifier, hide ) );
410 }
411 
412 WPropTrigger WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER& initial,
413  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
414 {
415  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_TRIGGER >( name, description, initial, notifier, hide ) );
416 }
417 
418 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
419 // convenience methods for
420 // template< typename T>
421 // std::shared_ptr< WPropertyVariable< T > > addProperty( std::string name, std::string description, const T& initial,
422 // std::shared_ptr< WCondition > condition,
423 // WPropertyBase::PropertyChangeNotifierType notifier, bool hide = false );
424 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
425 
426 WPropBool WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
427  std::shared_ptr< WCondition > condition,
428  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
429 {
430  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, condition, notifier, hide ) );
431 }
432 
433 WPropInt WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
434  std::shared_ptr< WCondition > condition,
435  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
436 {
437  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_INT >( name, description, initial, condition, notifier, hide ) );
438 }
439 
440 WPropDouble WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
441  std::shared_ptr< WCondition > condition,
442  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
443 {
444  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_DOUBLE >( name, description, initial, condition, notifier, hide ) );
445 }
446 
447 WPropString WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
448  std::shared_ptr< WCondition > condition,
449  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
450 {
451  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, condition, notifier, hide ) );
452 }
453 
454 WPropFilename WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
455  std::shared_ptr< WCondition > condition,
456  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
457 {
458  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_PATH >( name, description, initial, condition, notifier, hide ) );
459 }
460 
461 WPropSelection WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
462  std::shared_ptr< WCondition > condition,
463  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
464 {
465  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, condition, notifier, hide ) );
466 }
467 
468 WPropPosition WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
469  std::shared_ptr< WCondition > condition,
470  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
471 {
472  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, condition, notifier, hide ) );
473 }
474 
475 WPropColor WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
476  std::shared_ptr< WCondition > condition,
477  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
478 {
479  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_COLOR >( name, description, initial, condition, notifier, hide ) );
480 }
481 
482 WPropTrigger WPropertyGroup::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER& initial,
483  std::shared_ptr< WCondition > condition,
484  WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
485 {
486  return addDefaultConstraints( addProperty< WPVBaseTypes::PV_TRIGGER >( name, description, initial, condition, notifier, hide ) );
487 }
488 
This class represents a subset of a WItemSelection.
Definition: WItemSelector.h:53
This only is a 3d double vector.
std::shared_ptr< WConditionSet > m_updateCondition
Condition notified whenever something changes.
boost::function< void(std::shared_ptr< WPropertyBase >)> PropertyChangeNotifierType
Signal signature emitted during set operations.
std::shared_ptr< WPropertyBase > SPtr
Convenience typedef for a std::shared_ptr< WPropertyBase >
Definition: WPropertyBase.h:53
This is the base class and interface for property groups.
PropertyContainerType::const_iterator PropertyConstIterator
The const iterator type of the container.
static const std::string separator
The separator used to separate groups and subgroups.
virtual std::shared_ptr< WPropertyBase > findProperty(std::string name) const
Searches the property with a given name.
PropertySharedContainerType m_properties
The set of proerties.
Class to manage properties of an object and to provide convenience methods for easy access and manipu...
WPropGroup addPropertyGroup(std::string name, std::string description, bool hide=false)
Create and add a new property group.
PropType addProperty(PropType prop)
Insert the specified property into the list.
std::shared_ptr< WPropertyGroup > SPtr
shared pointer to object of this type
virtual PROPERTY_TYPE getType() const
Gets the real type of this instance.
virtual bool setAsString(std::string value)
This methods allows properties to be set by a string value.
virtual std::shared_ptr< WPropertyBase > clone()
This method clones a property and returns the clone.
virtual std::string getAsString()
Returns the current value as a string.
virtual bool setImpl(std::shared_ptr< WPropertyGroup > value, std::string path="", std::vector< std::string > exclude=std::vector< std::string >(), bool recommendedOnly=false)
This function implements the set functionality.
virtual void clear()
Removes all properties from the list.
virtual ~WPropertyGroup()
destructor
WPropertyGroup(std::string name="unnamed group", std::string description="an unnamed group of properties")
Constructor.
virtual bool set(std::shared_ptr< WPropertyBase > value, bool recommendedOnly=false)
Sets the value from the specified property to this one.
void removeProperty(std::shared_ptr< WPropertyBase > prop)
Remove the specified property from the list.
std::shared_ptr< WSharedObjectTicketRead< T > > ReadTicket
Type for read tickets.
Definition: WSharedObject.h:65
std::shared_ptr< WSharedObjectTicketWrite< T > > WriteTicket
Type for write tickets.
Definition: WSharedObject.h:70
WriteTicket getWriteTicket(bool suppressNotify=false) const
Returns a ticket to get write access to the contained data.
PV_TRIGGER
Enum denoting the possible trigger states.
WColor PV_COLOR
base type used for every WPVColor
std::string PV_STRING
base type used for every WPVString
double PV_DOUBLE
base type used for every WPVDouble
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
void addTo(WPropSelection prop)
Add the PC_ISVALID constraint to the property.
void addTo(WPropSelection prop)
Add the PC_NOTEMPTY constraint to the property.