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

#include <ossimNitfRegisteredDes.h>

Inheritance diagram for ossimNitfRegisteredDes:
ossimObject ossimPropertyInterface ossimReferenced ossimNitfXmlDataContentDes

Public Member Functions

 ossimNitfRegisteredDes ()
 default constructor More...
 
 ossimNitfRegisteredDes (const std::string &desName, ossim_uint32 desLength)
 Constructor that takes name and size. More...
 
virtual ~ossimNitfRegisteredDes ()
 destructor More...
 
virtual std::string getRegisterDesName () const
 This will return the name of the registered des for this user defined header. More...
 
virtual const std::string & getDesName () const
 This will return the name of the registered des for this user defined header. More...
 
virtual void setDesName (const std::string &desName)
 
virtual ossim_uint32 getSizeInBytes () const
 Returns the length in bytes of the des from the CEL or REL field. More...
 
virtual ossim_uint32 getDesLength () const
 Returns the length in bytes of the des from the CEL or REL field. More...
 
virtual void setDesLength (ossim_uint32 length)
 Set the des length. More...
 
virtual void parseStream (std::istream &in)=0
 This will allow the user defined data to parse the stream. More...
 
virtual void writeStream (std::ostream &out)=0
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual void getMetadata (ossimKeywordlist &kwl, const char *prefix=0) const
 Default interface to populate keyword list with metadata. More...
 
virtual std::ostream & print (std::ostream &out, const std::string &prefix=std::string()) const
 Pure virtual print method that outputs a key/value type format adding prefix to keys. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const ossimString &prefix) const
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () 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
 
virtual void accept (ossimVisitor &visitor)
 
- 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
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 

Protected Attributes

std::string m_desName
 
ossim_uint32 m_desLength
 

Additional Inherited Members

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

Detailed Description

Definition at line 24 of file ossimNitfRegisteredDes.h.

Constructor & Destructor Documentation

◆ ossimNitfRegisteredDes() [1/2]

ossimNitfRegisteredDes::ossimNitfRegisteredDes ( )

default constructor

Definition at line 22 of file ossimNitfRegisteredDes.cpp.

◆ ossimNitfRegisteredDes() [2/2]

ossimNitfRegisteredDes::ossimNitfRegisteredDes ( const std::string &  desName,
ossim_uint32  desLength 
)

Constructor that takes name and size.

Definition at line 29 of file ossimNitfRegisteredDes.cpp.

30  :
31  ossimObject(),
33  m_desName(desName),
34  m_desLength(desLength)
35 {}

◆ ~ossimNitfRegisteredDes()

ossimNitfRegisteredDes::~ossimNitfRegisteredDes ( )
virtual

destructor

Definition at line 37 of file ossimNitfRegisteredDes.cpp.

38 {}

Member Function Documentation

◆ getDesLength()

ossim_uint32 ossimNitfRegisteredDes::getDesLength ( ) const
virtual

Returns the length in bytes of the des from the CEL or REL field.

The entire TRE length is 11 plus this(the size of the CEL or REL field).

Returns
Length of REDATA or CEDATA.

Definition at line 62 of file ossimNitfRegisteredDes.cpp.

References m_desLength.

Referenced by getSizeInBytes(), and ossimNitfDesInformation::parseStream().

63 {
64  return m_desLength;
65 }

◆ getDesName()

const std::string & ossimNitfRegisteredDes::getDesName ( ) const
virtual

This will return the name of the registered des for this user defined header.

Definition at line 46 of file ossimNitfRegisteredDes.cpp.

References m_desName.

Referenced by ossimNitfDesInformation::parseStream(), and ossimNitfXmlDataContentDes::print().

47 {
48  return m_desName;
49 }

◆ getMetadata()

void ossimNitfRegisteredDes::getMetadata ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Default interface to populate keyword list with metadata.

expample: country_code: US This implementation does nothing. Derived classes should implement as they see fit.

Parameters
kwlKeywordlist to populate with metadata.
prefixOptional prefix to put in front of key, like: "image1.".

Definition at line 85 of file ossimNitfRegisteredDes.cpp.

87 {
88 }

◆ getProperty()

ossimRefPtr< ossimProperty > ossimNitfRegisteredDes::getProperty ( const ossimString name) const
virtual

Reimplemented from ossimPropertyInterface.

Definition at line 76 of file ossimNitfRegisteredDes.cpp.

77 {
78  return 0;
79 }

◆ getPropertyNames()

void ossimNitfRegisteredDes::getPropertyNames ( std::vector< ossimString > &  propertyNames) const
virtual

Reimplemented from ossimPropertyInterface.

Definition at line 81 of file ossimNitfRegisteredDes.cpp.

82 {
83 }

◆ getRegisterDesName()

std::string ossimNitfRegisteredDes::getRegisterDesName ( ) const
virtual

This will return the name of the registered des for this user defined header.

Note
Deprecated - Use getDesName()

Definition at line 40 of file ossimNitfRegisteredDes.cpp.

References m_desName.

41 {
42  // Deprecated:
43  return m_desName;
44 }

◆ getSizeInBytes()

ossim_uint32 ossimNitfRegisteredDes::getSizeInBytes ( ) const
virtual

Returns the length in bytes of the des from the CEL or REL field.

Note
Depricated use: getDesLength()

The entire TRE length is 11 plus this(the size of the CEL or REL field).

Returns
Length of REDATA or CEDATA.

Definition at line 56 of file ossimNitfRegisteredDes.cpp.

References getDesLength().

Referenced by ossimNitfXmlDataContentDes::parseStream().

57 {
58  // Deprecated:
59  return getDesLength();
60 }
virtual ossim_uint32 getDesLength() const
Returns the length in bytes of the des from the CEL or REL field.

◆ parseStream()

virtual void ossimNitfRegisteredDes::parseStream ( std::istream &  in)
pure virtual

This will allow the user defined data to parse the stream.

Implemented in ossimNitfXmlDataContentDes.

Referenced by ossimNitfDesInformation::parseStream().

◆ print()

std::ostream & ossimNitfRegisteredDes::print ( std::ostream &  out,
const std::string &  prefix = std::string() 
) const
virtual

Pure virtual print method that outputs a key/value type format adding prefix to keys.

Reimplemented in ossimNitfXmlDataContentDes.

Definition at line 90 of file ossimNitfRegisteredDes.cpp.

Referenced by ossimNitfDesInformation::print(), and saveState().

92 {
93  // return print(out);
94  return out;
95 }

◆ saveState()

bool ossimNitfRegisteredDes::saveState ( ossimKeywordlist kwl,
const ossimString prefix 
) const
virtual

Definition at line 97 of file ossimNitfRegisteredDes.cpp.

References ossimKeywordlist::add(), ossimKeywordlist::parseStream(), and print().

98 {
99  bool result = false;
100  // by default we will use the already implemented print method as backup
101  //
102  std::ostringstream out;
103 
104  print(out);
105 
106  ossimKeywordlist kwlTemp;
107 
108  std::istringstream in(out.str());
109  if(kwlTemp.parseStream(in))
110  {
111  result = true;
112  kwl.add(prefix, kwlTemp);
113  }
114 
115  return result;
116 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
Represents serializable keyword/value map.
virtual std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
Pure virtual print method that outputs a key/value type format adding prefix to keys.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual bool parseStream(ossim::istream &is, bool ignoreBinaryChars)
deprecated method
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32

◆ setDesLength()

void ossimNitfRegisteredDes::setDesLength ( ossim_uint32  length)
virtual

Set the des length.

Parameters
lengthLength of des.

Definition at line 67 of file ossimNitfRegisteredDes.cpp.

References m_desLength.

Referenced by ossimNitfDesInformation::parseStream().

68 {
69  m_desLength = length;
70 }

◆ setDesName()

void ossimNitfRegisteredDes::setDesName ( const std::string &  desName)
virtual
Parameters
desNameName of des.
Note
Users should set des name as this is an unknown des.

Definition at line 51 of file ossimNitfRegisteredDes.cpp.

References m_desName.

52 {
53  m_desName = desName;
54 }

◆ setProperty()

void ossimNitfRegisteredDes::setProperty ( ossimRefPtr< ossimProperty property)
virtual

Reimplemented from ossimPropertyInterface.

Definition at line 72 of file ossimNitfRegisteredDes.cpp.

73 {
74 }

◆ writeStream()

virtual void ossimNitfRegisteredDes::writeStream ( std::ostream &  out)
pure virtual

Implemented in ossimNitfXmlDataContentDes.

Member Data Documentation

◆ m_desLength

ossim_uint32 ossimNitfRegisteredDes::m_desLength
protected

Definition at line 119 of file ossimNitfRegisteredDes.h.

Referenced by getDesLength(), and setDesLength().

◆ m_desName

std::string ossimNitfRegisteredDes::m_desName
protected

Definition at line 118 of file ossimNitfRegisteredDes.h.

Referenced by getDesName(), getRegisterDesName(), and setDesName().


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