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

Info Base. More...

#include <ossimInfoBase.h>

Inheritance diagram for ossimInfoBase:
ossimReferenced ossimCcfInfo ossimDemInfo ossimDoqq ossimDtedInfo ossimEnviInfo ossimGeoPdfInfo ossimGpkgInfo ossimH5Info ossimHdf5Info ossimHdfInfo ossimJ2kInfo ossimKakaduJpipInfo ossimLasInfo ossimNitfInfo ossimOgrInfo ossimRpfInfo ossimTiffInfo ossimXmpInfo

Public Member Functions

 ossimInfoBase ()
 default constructor More...
 
virtual bool open (const ossimFilename &file)
 open method. More...
 
virtual bool open (std::shared_ptr< ossim::istream > &str, const std::string &connectionString)
 open method. More...
 
virtual std::ostream & print (std::ostream &out) const =0
 Print method. More...
 
void setProcessOverviewFlag (bool flag)
 Sets the overview flag. More...
 
bool getProcessOverviewFlag () const
 Method to get the overview flag. More...
 
virtual bool getKeywordlist (ossimKeywordlist &kwl) const
 Method to dump info to a keyword list. More...
 
virtual bool getKeywordlist (ossimKeywordlist &kwl, ossim_uint32 entryIndex) const
 Method to dump info to a keyword list. More...
 
- 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 ~ossimInfoBase ()
 virtual destructor More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

bool theOverviewFlag
 

Detailed Description

Info Base.

This is the base class for all info objects. The purpose of an Info object is to dump whatever info is available for a given file name to user.

Definition at line 32 of file ossimInfoBase.h.

Constructor & Destructor Documentation

◆ ossimInfoBase()

ossimInfoBase::ossimInfoBase ( )

default constructor

Definition at line 19 of file ossimInfoBase.cpp.

20  : theOverviewFlag(true)
21 {}

◆ ~ossimInfoBase()

ossimInfoBase::~ossimInfoBase ( )
protectedvirtual

virtual destructor

Definition at line 23 of file ossimInfoBase.cpp.

24 {}

Member Function Documentation

◆ getKeywordlist() [1/2]

bool ossimInfoBase::getKeywordlist ( ossimKeywordlist kwl) const
virtual

Method to dump info to a keyword list.

Parameters
kwlThe keyword list to initialize.
Returns
true on success, false on error.

Reimplemented in ossimOgrInfo, and ossimHdf5Info.

Definition at line 51 of file ossimInfoBase.cpp.

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

Referenced by ossimKakaduJpipHandler::getImageGeometry(), and getKeywordlist().

52 {
53  // Do a print to a memory stream.
55  print(out);
56 
57  std::istringstream in(out.str());
58  // Give the result to the keyword list.
59  return kwl.parseStream(in);
60 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
virtual bool parseStream(ossim::istream &is, bool ignoreBinaryChars)
deprecated method
virtual std::ostream & print(std::ostream &out) const =0
Print method.
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32

◆ getKeywordlist() [2/2]

bool ossimInfoBase::getKeywordlist ( ossimKeywordlist kwl,
ossim_uint32  entryIndex 
) const
virtual

Method to dump info to a keyword list.

Parameters
kwlThe keyword list to initialize.
entryIndexEntry to print. Not supported by all info objects yet.
Returns
true on success, false on error.

Reimplemented in ossimNitfInfo.

Definition at line 62 of file ossimInfoBase.cpp.

References getKeywordlist().

64 {
65  // If this gets hit the specific info object does not support entry indexes.
66  return getKeywordlist( kwl );
67 }
virtual bool getKeywordlist(ossimKeywordlist &kwl) const
Method to dump info to a keyword list.

◆ getProcessOverviewFlag()

bool ossimInfoBase::getProcessOverviewFlag ( ) const

Method to get the overview flag.

Returns
The overview flag.

Definition at line 46 of file ossimInfoBase.cpp.

References theOverviewFlag.

Referenced by ossimNitfInfo::print().

47 {
48  return theOverviewFlag;
49 }

◆ open() [1/2]

bool ossimInfoBase::open ( const ossimFilename file)
virtual

open method.

Parameters
fileFile name to open.
Returns
true on success false on error.

Reimplemented in ossimTiffInfo, ossimOgrInfo, ossimHdf5Info, ossimGeoPdfInfo, ossimKakaduJpipInfo, ossimXmpInfo, ossimH5Info, ossimCcfInfo, ossimJp2Info, ossimJ2kInfo, ossimDemInfo, ossimRpfInfo, ossimHdfInfo, ossimGpkgInfo, ossimLasInfo, ossimNitfInfo, and ossimEnviInfo.

Definition at line 26 of file ossimInfoBase.cpp.

References ossimString::c_str(), and ossim::StreamFactoryRegistry::instance().

Referenced by ossimH5InfoFactory::create(), and ossimDoqq::ossimDoqq().

27 {
28  std::string connectionString = file.c_str();
29  std::shared_ptr<ossim::istream> str = ossim::StreamFactoryRegistry::instance()->
30  createIstream( file.c_str(), std::ios_base::in|std::ios_base::binary);
31  if(!str) return false;
32  return open(str, connectionString);
33 }
virtual bool open(const ossimFilename &file)
open method.
static StreamFactoryRegistry * instance()
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ open() [2/2]

bool ossimInfoBase::open ( std::shared_ptr< ossim::istream > &  str,
const std::string &  connectionString 
)
virtual

open method.

Parameters
strFile name to open.
Returns
true on success false on error.

Reimplemented in ossimDoqq, ossimTiffInfo, ossimDtedInfo, ossimGeoPdfInfo, ossimCcfInfo, ossimDemInfo, and ossimNitfInfo.

Definition at line 35 of file ossimInfoBase.cpp.

37 {
38  return false;
39 }

◆ print()

virtual std::ostream& ossimInfoBase::print ( std::ostream &  out) const
pure virtual

◆ setProcessOverviewFlag()

void ossimInfoBase::setProcessOverviewFlag ( bool  flag)

Sets the overview flag.

Parameters
flagIf true overview info is processed also.

Definition at line 41 of file ossimInfoBase.cpp.

References theOverviewFlag.

Referenced by ossimKakaduJpipInfo::print().

42 {
43  theOverviewFlag = flag;
44 }

Member Data Documentation

◆ theOverviewFlag

bool ossimInfoBase::theOverviewFlag
protected

Definition at line 101 of file ossimInfoBase.h.

Referenced by getProcessOverviewFlag(), and setProcessOverviewFlag().


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