OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimBooleanProperty.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts (gpotts@imagelinks.com)
6 //
7 //*************************************************************************
8 // $Id: ossimBooleanProperty.cpp 19888 2011-08-03 11:30:22Z gpotts $
10 
11 RTTI_DEF1(ossimBooleanProperty, "ossimBooleanProperty", ossimProperty);
12 
14  bool value)
15  :ossimProperty(name),
16  theValue(value)
17 {
18 }
19 
21  :ossimProperty(rhs),
22  theValue(rhs.theValue)
23 {
24 }
25 
27 {
28  return new ossimBooleanProperty(*this);
29 }
30 
32 {
34 
35  const ossimBooleanProperty* property = dynamic_cast<const ossimBooleanProperty*>(&rhs);
36  if(property)
37  {
38  theValue = property->theValue;
39  }
40 
41  return *this;
42 }
43 
45 {
46  theValue = value.toBool();
47 
48  return true;
49 }
50 
52  ossimString& /* msg */)
53 {
54  theValue = value;
55 
56  return true;
57 }
58 
60 {
61  valueResult = theValue?"true":"false";
62 }
63 
65 {
66  return theValue;
67 }
virtual bool setValue(const ossimString &value)
virtual const ossimProperty & assign(const ossimProperty &rhs)
virtual ossimObject * dup() const
virtual const ossimProperty & assign(const ossimProperty &rhs)
virtual ossimString valueToString() const
bool toBool() const
String to numeric methods.
bool setBooleanValue(bool value, ossimString &msg)
RTTI_DEF1(ossimBooleanProperty, "ossimBooleanProperty", ossimProperty)
ossimBooleanProperty(const ossimString &name=ossimString(""), bool value=false)