OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimProperty Class Referenceabstract

#include <ossimProperty.h>

Inheritance diagram for ossimProperty:
ossimObject ossimReferenced ossimBinaryDataProperty ossimBooleanProperty ossimColorProperty ossimContainerProperty ossimDateProperty ossimDoubleGridProperty ossimFilenameProperty ossimFontProperty ossimMatrixProperty ossimNumericProperty ossimStringListProperty ossimStringProperty ossimTextProperty

Public Types

enum  ossimPropertyChangeType {
  ossimPropertyChangeType_NOTSPECIFIED = 0, ossimPropertyChangeType_CACHE_REFRESH = 1, ossimPropertyChangeType_FULL_REFRESH = 2, ossimPropertyChangeType_AFFECTS_OTHERS = 4,
  ossimPropertyChangeType_ALL = (ossimPropertyChangeType_CACHE_REFRESH|ossimPropertyChangeType_FULL_REFRESH|ossimPropertyChangeType_AFFECTS_OTHERS)
}
 

Public Member Functions

 ossimProperty (const ossimString &name=ossimString(""))
 
 ossimProperty (const ossimProperty &rhs)
 
const ossimPropertyoperator= (const ossimProperty &rhs)
 
virtual const ossimPropertyassign (const ossimProperty &rhs)
 
const ossimStringgetName () const
 
void setName (const ossimString &name)
 
virtual bool setValue (const ossimString &value)=0
 
virtual void valueToString (ossimString &valueResult) const =0
 
virtual ossimString valueToString () const
 
virtual const ossimContainerPropertyasContainer () const
 
virtual ossimContainerPropertyasContainer ()
 
bool isChangeTypeSet (int type) const
 
void clearChangeType ()
 
void setChangeType (int type, bool on=true)
 
void setFullRefreshBit ()
 
void setCacheRefreshBit ()
 
ossimPropertyChangeType getChangeType () const
 
bool isFullRefresh () const
 
bool isCacheRefresh () const
 
bool isChangeTypeSpecified () const
 
bool affectsOthers () const
 
virtual void setReadOnlyFlag (bool flag)
 
bool getReadOnlyFlag () const
 
bool isReadOnly () const
 
void setModifiedFlag (bool flag)
 
bool getModifiedFlag () const
 
bool isModified () const
 
void clearModifiedFlag ()
 
void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual ossimRefPtr< ossimXmlNodetoXml () const
 
virtual void saveState (ossimKeywordlist &kwl, const ossimString &prefix="") const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Protected Member Functions

virtual ~ossimProperty ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

ossimString theName
 
ossimString theDescription
 
bool theReadOnlyFlag
 
ossimPropertyChangeType theChangeType
 
bool theModifiedFlag
 

Detailed Description

Definition at line 16 of file ossimProperty.h.

Member Enumeration Documentation

◆ ossimPropertyChangeType

This are bitwise and can be ored together The change type is very important and it determines how things are refreshed.

Enumerator
ossimPropertyChangeType_NOTSPECIFIED 
ossimPropertyChangeType_CACHE_REFRESH 
ossimPropertyChangeType_FULL_REFRESH 
ossimPropertyChangeType_AFFECTS_OTHERS 
ossimPropertyChangeType_ALL 

Definition at line 24 of file ossimProperty.h.

Constructor & Destructor Documentation

◆ ossimProperty() [1/2]

ossimProperty::ossimProperty ( const ossimString name = ossimString(""))

Definition at line 22 of file ossimProperty.cpp.

◆ ossimProperty() [2/2]

ossimProperty::ossimProperty ( const ossimProperty rhs)

Definition at line 30 of file ossimProperty.cpp.

31  :theName(rhs.theName),
35 {
36 }
ossimPropertyChangeType theChangeType
Definition: ossimProperty.h:82
ossimString theName
Definition: ossimProperty.h:79
bool theModifiedFlag
Definition: ossimProperty.h:83
bool theReadOnlyFlag
Definition: ossimProperty.h:81

◆ ~ossimProperty()

ossimProperty::~ossimProperty ( )
protectedvirtual

Definition at line 38 of file ossimProperty.cpp.

39 {
40 }

Member Function Documentation

◆ accept()

void ossimProperty::accept ( ossimVisitor visitor)
virtual

Reimplemented from ossimObject.

Reimplemented in ossimContainerProperty.

Definition at line 184 of file ossimProperty.cpp.

References ossimObject::accept().

Referenced by ossimContainerProperty::accept().

185 {
186  ossimObject::accept(visitor);
187 }
virtual void accept(ossimVisitor &visitor)

◆ affectsOthers()

bool ossimProperty::affectsOthers ( ) const

◆ asContainer() [1/2]

const ossimContainerProperty * ossimProperty::asContainer ( ) const
virtual

Reimplemented in ossimContainerProperty.

Definition at line 72 of file ossimProperty.cpp.

Referenced by saveState().

73 {
74  return 0;
75 }

◆ asContainer() [2/2]

ossimContainerProperty * ossimProperty::asContainer ( )
virtual

Reimplemented in ossimContainerProperty.

Definition at line 77 of file ossimProperty.cpp.

78 {
79  return 0;
80 }

◆ assign()

const ossimProperty & ossimProperty::assign ( const ossimProperty rhs)
virtual

◆ clearChangeType()

void ossimProperty::clearChangeType ( )

◆ clearModifiedFlag()

void ossimProperty::clearModifiedFlag ( )

Definition at line 169 of file ossimProperty.cpp.

References theModifiedFlag.

170 {
171  theModifiedFlag = false;
172 }
bool theModifiedFlag
Definition: ossimProperty.h:83

◆ getChangeType()

ossimProperty::ossimPropertyChangeType ossimProperty::getChangeType ( ) const

Definition at line 114 of file ossimProperty.cpp.

References theChangeType.

115 {
116  return theChangeType;
117 }
ossimPropertyChangeType theChangeType
Definition: ossimProperty.h:82

◆ getDescription()

ossimString ossimProperty::getDescription ( ) const
virtual

Reimplemented from ossimObject.

Definition at line 179 of file ossimProperty.cpp.

References theDescription.

180 {
181  return theDescription;
182 }
ossimString theDescription
Definition: ossimProperty.h:80

◆ getModifiedFlag()

bool ossimProperty::getModifiedFlag ( ) const

Definition at line 159 of file ossimProperty.cpp.

References theModifiedFlag.

160 {
161  return theModifiedFlag;
162 }
bool theModifiedFlag
Definition: ossimProperty.h:83

◆ getName()

const ossimString & ossimProperty::getName ( ) const

◆ getReadOnlyFlag()

bool ossimProperty::getReadOnlyFlag ( ) const

Definition at line 144 of file ossimProperty.cpp.

References theReadOnlyFlag.

Referenced by isReadOnly().

145 {
146  return theReadOnlyFlag;
147 }
bool theReadOnlyFlag
Definition: ossimProperty.h:81

◆ isCacheRefresh()

bool ossimProperty::isCacheRefresh ( ) const

◆ isChangeTypeSet()

bool ossimProperty::isChangeTypeSet ( int  type) const

Definition at line 82 of file ossimProperty.cpp.

References theChangeType.

Referenced by affectsOthers(), isCacheRefresh(), and isFullRefresh().

83 {
84  return ((type&theChangeType)!=0);
85 }
ossimPropertyChangeType theChangeType
Definition: ossimProperty.h:82

◆ isChangeTypeSpecified()

bool ossimProperty::isChangeTypeSpecified ( ) const

◆ isFullRefresh()

bool ossimProperty::isFullRefresh ( ) const

◆ isModified()

bool ossimProperty::isModified ( ) const

Definition at line 164 of file ossimProperty.cpp.

References theModifiedFlag.

165 {
166  return (theModifiedFlag == true);
167 }
bool theModifiedFlag
Definition: ossimProperty.h:83

◆ isReadOnly()

bool ossimProperty::isReadOnly ( ) const

Definition at line 149 of file ossimProperty.cpp.

References getReadOnlyFlag().

150 {
151  return (getReadOnlyFlag());
152 }
bool getReadOnlyFlag() const

◆ operator=()

const ossimProperty & ossimProperty::operator= ( const ossimProperty rhs)

Definition at line 15 of file ossimProperty.cpp.

References assign().

16 {
17  this->assign(rhs);
18 
19  return *this;
20 }
virtual const ossimProperty & assign(const ossimProperty &rhs)

◆ saveState()

void ossimProperty::saveState ( ossimKeywordlist kwl,
const ossimString prefix = "" 
) const
virtual

Definition at line 199 of file ossimProperty.cpp.

References ossimKeywordlist::add(), asContainer(), getName(), ossimContainerProperty::getNumberOfProperties(), saveState(), ossimContainerProperty::theChildPropertyList, ossimRefPtr< T >::valid(), and valueToString().

Referenced by saveState().

200 {
201  const ossimContainerProperty* container = asContainer();
202  if(container)
203  {
204  ossim_uint32 nproperties = container->getNumberOfProperties();
205  ossim_uint32 propertiesIndex = 0;
206  for(propertiesIndex = 0; propertiesIndex < nproperties; ++propertiesIndex)
207  {
208  ossimString newPrefix = prefix + container->getName() + ".";
209  ossimRefPtr<ossimProperty> prop = container->theChildPropertyList[propertiesIndex];
210  if(prop.valid())
211  {
212  prop->saveState(kwl, newPrefix);
213  }
214  }
215  }
216  else
217  {
218  kwl.add(prefix + getName(), valueToString(), true);
219  }
220 }
virtual ossim_uint32 getNumberOfProperties() const
bool valid() const
Definition: ossimRefPtr.h:75
std::vector< ossimRefPtr< ossimProperty > > theChildPropertyList
virtual ossimString valueToString() const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual void saveState(ossimKeywordlist &kwl, const ossimString &prefix="") const
unsigned int ossim_uint32
virtual const ossimContainerProperty * asContainer() const
const ossimString & getName() const

◆ setCacheRefreshBit()

void ossimProperty::setCacheRefreshBit ( )

◆ setChangeType()

void ossimProperty::setChangeType ( int  type,
bool  on = true 
)

Definition at line 92 of file ossimProperty.cpp.

References theChangeType.

Referenced by ossimImageFileWriter::getProperty(), setCacheRefreshBit(), and setFullRefreshBit().

93 {
94  if(on)
95  {
97  }
98  else
99  {
100  theChangeType = static_cast<ossimPropertyChangeType>((~type)&theChangeType);
101  }
102 }
ossimPropertyChangeType theChangeType
Definition: ossimProperty.h:82

◆ setDescription()

void ossimProperty::setDescription ( const ossimString description)

Definition at line 174 of file ossimProperty.cpp.

References theDescription.

175 {
176  theDescription = description;
177 }
ossimString theDescription
Definition: ossimProperty.h:80

◆ setFullRefreshBit()

void ossimProperty::setFullRefreshBit ( )

◆ setModifiedFlag()

void ossimProperty::setModifiedFlag ( bool  flag)

Definition at line 154 of file ossimProperty.cpp.

References theModifiedFlag.

155 {
156  theModifiedFlag = flag;
157 }
bool theModifiedFlag
Definition: ossimProperty.h:83

◆ setName()

void ossimProperty::setName ( const ossimString name)

Definition at line 47 of file ossimProperty.cpp.

References theName.

Referenced by ossimDtedInfo::getProperty().

48 {
49  theName = name;
50 }
ossimString theName
Definition: ossimProperty.h:79

◆ setReadOnlyFlag()

void ossimProperty::setReadOnlyFlag ( bool  flag)
virtual

◆ setValue()

virtual bool ossimProperty::setValue ( const ossimString value)
pure virtual

◆ toXml()

ossimRefPtr< ossimXmlNode > ossimProperty::toXml ( ) const
virtual

Reimplemented in ossimContainerProperty.

Definition at line 189 of file ossimProperty.cpp.

References getName(), ossimXmlNode::setTag(), ossimXmlNode::setText(), and valueToString().

190 {
192 
193  result->setTag(getName());
194  result->setText(valueToString());
195 
196  return result;
197 }
void setTag(const ossimString &tag)
void setText(const ossimString &text)
virtual ossimString valueToString() const
const ossimString & getName() const

◆ valueToString() [1/2]

virtual void ossimProperty::valueToString ( ossimString valueResult) const
pure virtual

Implemented in ossimStringProperty, ossimContainerProperty, ossimNumericProperty, ossimFilenameProperty, ossimDoubleGridProperty, ossimMatrixProperty, ossimDateProperty, ossimBinaryDataProperty, ossimTextProperty, ossimBooleanProperty, ossimColorProperty, ossimFontProperty, and ossimStringListProperty.

Referenced by ossimNitfWriter::addDataExtensionSegment(), ossimColorProperty::assign(), ossimDoubleGridProperty::assign(), ossimTextProperty::assign(), ossimDateProperty::assign(), ossimStringProperty::assign(), ossimNumericProperty::assign(), ossimFilenameProperty::assign(), ossimHistogramMatchFilter::autoLoadInputHistogram(), ossimPropertyInterface::getPropertyValueAsString(), ossimInfo::isImageEntryOverview(), ossimFftFilter::setProperty(), ossimKakaduJpipHandler::setProperty(), ossimNitfDataExtensionSegmentV2_1::setProperty(), ossimCastTileSourceFilter::setProperty(), ossimSlopeFilter::setProperty(), ossimGdalWriter::setProperty(), ossimNitfImageHeaderV2_X::setProperty(), ossimHistogramMatchFilter::setProperty(), ossimNBandToIndexFilter::setProperty(), ossimNitfFileHeaderV2_X::setProperty(), ossimTiffWriter::setProperty(), ossimPdfWriter::setProperty(), ossimImageRenderer::setProperty(), ossimNitfImageHeaderV2_1::setProperty(), ossimBandSelector::setProperty(), ossimMetadataFileWriter::setProperty(), ossimMapCompositionSource::setProperty(), ossimEquationCombiner::setProperty(), ossimTiffTileSource::setProperty(), ossimNitfFileHeaderV2_1::setProperty(), ossimNitfFileHeaderV2_0::setProperty(), and ossimImageHandler::setProperty().

◆ valueToString() [2/2]

ossimString ossimProperty::valueToString ( ) const
virtual

Definition at line 62 of file ossimProperty.cpp.

Referenced by saveState(), and toXml().

63 {
64  ossimString result;
65 
66  valueToString(result);
67 
68  return result;
69 
70 }
virtual ossimString valueToString() const

Member Data Documentation

◆ theChangeType

ossimPropertyChangeType ossimProperty::theChangeType
protected

◆ theDescription

ossimString ossimProperty::theDescription
protected

Definition at line 80 of file ossimProperty.h.

Referenced by getDescription(), and setDescription().

◆ theModifiedFlag

bool ossimProperty::theModifiedFlag
protected

◆ theName

ossimString ossimProperty::theName
protected

Definition at line 79 of file ossimProperty.h.

Referenced by assign(), getName(), and setName().

◆ theReadOnlyFlag

bool ossimProperty::theReadOnlyFlag
protected

Definition at line 81 of file ossimProperty.h.

Referenced by assign(), getReadOnlyFlag(), and setReadOnlyFlag().


The documentation for this class was generated from the following files: