OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ImageHandlerState.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 //*****************************************************************************
6 #ifndef ossimImageHandlerState_HEADER
7 #define ossimImageHandlerState_HEADER 1
8 #include <ossim/base/State.h>
9 #include <ossim/base/ossimIpt.h>
12 #include <memory>
13 
14 namespace ossim
15 {
70  class OSSIM_DLL ImageHandlerState : public ossim::State
71  {
72  public:
73  ImageHandlerState();
74  virtual ~ImageHandlerState();
75  virtual const ossimString& getTypeName()const override;
76  static const ossimString& getStaticTypeName();
77 
85  virtual bool load(const ossimKeywordlist& kwl,
86  const ossimString& prefix="") override;
94  virtual bool save(ossimKeywordlist& kwl,
95  const ossimString& prefix="")const override;
96 
100  std::shared_ptr<ImageHandlerState> getOverviewState(){return m_overviewState;}
101 
105  std::shared_ptr<const ImageHandlerState> getOverviewState()const{return m_overviewState;}
106 
110  void setOverviewState(std::shared_ptr<ImageHandlerState> overviewState){m_overviewState=overviewState;}
111  void setConnectionString(const ossimString& connectionString){m_connectionString = connectionString;}
112  const ossimString& getConnectionString()const{return m_connectionString;}
113  void setImageHandlerType(const ossimString& typeName){m_imageHandlerType = typeName;}
114  const ossimString& getImageHandlerType()const{return m_imageHandlerType;}
115  void setCurrentEntry(ossim_uint32 entry){m_currentEntry = entry;}
116  const ossim_uint32 getCurrentEntry()const{return m_currentEntry;}
117  std::shared_ptr<const ossimImageMetaData> getMetaData()const{return m_omd;}
118  std::shared_ptr<ossimImageMetaData> getMetaData(){return m_omd;}
119  void setMetaData(std::shared_ptr<ossimImageMetaData> omd){m_omd=omd;}
120  void setValidVertices(std::shared_ptr<ossimKeywordlist> kwl){m_validVertices=kwl;}
121  std::shared_ptr<ossimKeywordlist> getValidVertices(){return m_validVertices;}
122  std::shared_ptr<const ossimKeywordlist> getValidVertices()const{return m_validVertices;}
123 
127  bool hasMetaData()const;
128 
132  bool virtual loadDefaults(const ossimFilename& filename,
133  ossim_uint32 entry=0);
134  private:
135  static const ossimString m_typeName;
136  std::shared_ptr<ImageHandlerState> m_overviewState;
137  std::shared_ptr<ossimImageMetaData> m_omd;
138  std::shared_ptr<ossimKeywordlist> m_validVertices;
139  ossimString m_connectionString;
140  ossimString m_imageHandlerType;
141  ossim_uint32 m_currentEntry;
142  };
143 };
144 
145 #endif
Represents serializable keyword/value map.
This is the base for all state objects.
Definition: State.h:24
This code was derived from https://gist.github.com/mshockwave.
Definition: Barrier.h:8
unsigned int ossim_uint32
#define OSSIM_DLL