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