OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | List of all members
ossim::State Class Referenceabstract

This is the base for all state objects. More...

#include <State.h>

Public Member Functions

 State ()
 
virtual ~State ()
 
virtual const ossimStringgetTypeName () const =0
 
virtual bool load (const ossimKeywordlist &kwl, const ossimString &prefix="")=0
 Allows a state to be loaded from keywordlist. More...
 
virtual bool save (ossimKeywordlist &kwl, const ossimString &prefix="") const =0
 Allows a state to be saved to a keywordlist. More...
 

Detailed Description

This is the base for all state objects.

We started a new state object for our first step will be using this interface to cache the state of ImageHandlers. It is very expensive to keep opening a resource and then parsing all the meta information that describes the image. We should be able to do this once and then allow for it to be saved and reloaded witout ever having to parse the state again unless the state changes

Definition at line 24 of file State.h.

Constructor & Destructor Documentation

◆ State()

ossim::State::State ( )
inline

Definition at line 27 of file State.h.

27 {}

◆ ~State()

virtual ossim::State::~State ( )
inlinevirtual

Definition at line 28 of file State.h.

28 {}

Member Function Documentation

◆ getTypeName()

virtual const ossimString& ossim::State::getTypeName ( ) const
pure virtual
Returns
the typename of the state that uniquely identifies the name. Usually the class name will be used

◆ load()

bool ossim::State::load ( const ossimKeywordlist kwl,
const ossimString prefix = "" 
)
pure virtual

Allows a state to be loaded from keywordlist.

Definition at line 4 of file State.cpp.

6 {
7  return true;
8 }

◆ save()

bool ossim::State::save ( ossimKeywordlist kwl,
const ossimString prefix = "" 
) const
pure virtual

Allows a state to be saved to a keywordlist.

Definition at line 10 of file State.cpp.

References ossimKeywordlist::add().

12 {
13  kwl.add(prefix, "type", getTypeName(), true);
14 
15  return true;
16 }
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual const ossimString & getTypeName() const =0

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