OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
ossimKakaduCodecFactory Class Reference

Codec factory. More...

#include <ossimKakaduCodecFactory.h>

Inheritance diagram for ossimKakaduCodecFactory:
ossimCodecFactoryInterface

Public Member Functions

virtual ~ossimKakaduCodecFactory ()
 virtual destructor More...
 
virtual ossimCodecBasecreateCodec (const ossimString &type) const
 createCodec takes a type and will return a new codec to encode decode image buffers More...
 
virtual ossimCodecBasecreateCodec (const ossimKeywordlist &kwl, const char *prefix=0) const
 createCodec takes a type in the keywordlist and will return a new codec to encode decode image buffers More...
 
virtual void getTypeNameList (std::vector< ossimString > &typeNames) const
 
- Public Member Functions inherited from ossimCodecFactoryInterface
 ossimCodecFactoryInterface ()
 default constructor More...
 
virtual ~ossimCodecFactoryInterface ()
 virtual destructor More...
 
virtual ossimObjectcreateObject (const ossimString &type) const
 This is a bridge to the generic factory list interface that trys to call createObject. More...
 
virtual ossimObjectcreateObject (const ossimKeywordlist &kwl, const char *prefix=0) const
 This is a bridge to the generic factory list interface that trys to call createObject. More...
 

Static Public Member Functions

static ossimKakaduCodecFactoryinstance ()
 

Private Member Functions

 ossimKakaduCodecFactory ()
 hidden from use default constructor More...
 
 ossimKakaduCodecFactory (const ossimKakaduCodecFactory &obj)
 hidden from use copy constructor More...
 
const ossimKakaduCodecFactoryoperator= (const ossimKakaduCodecFactory &rhs)
 hidden from use operator = More...
 

Static Private Attributes

static ossimKakaduCodecFactorytheInstance = 0
 The single instance of this class. More...
 

Detailed Description

Codec factory.

Definition at line 25 of file ossimKakaduCodecFactory.h.

Constructor & Destructor Documentation

◆ ~ossimKakaduCodecFactory()

ossimKakaduCodecFactory::~ossimKakaduCodecFactory ( )
virtual

virtual destructor

Definition at line 28 of file ossimKakaduCodecFactory.cpp.

29 {}

◆ ossimKakaduCodecFactory() [1/2]

ossimKakaduCodecFactory::ossimKakaduCodecFactory ( )
private

hidden from use default constructor

Definition at line 72 of file ossimKakaduCodecFactory.cpp.

Referenced by instance().

73 {}

◆ ossimKakaduCodecFactory() [2/2]

ossimKakaduCodecFactory::ossimKakaduCodecFactory ( const ossimKakaduCodecFactory obj)
private

hidden from use copy constructor

Definition at line 75 of file ossimKakaduCodecFactory.cpp.

76 {}

Member Function Documentation

◆ createCodec() [1/2]

ossimCodecBase * ossimKakaduCodecFactory::createCodec ( const ossimString type) const
virtual

createCodec takes a type and will return a new codec to encode decode image buffers

Parameters
intype. Type identifer used to allocate the proper codec.
Returns
ossimCodecBase type.

Implements ossimCodecFactoryInterface.

Definition at line 39 of file ossimKakaduCodecFactory.cpp.

References ossimString::downcase(), and ossimRefPtr< T >::release().

Referenced by createCodec().

40 {
42 
43  if((type.downcase() == "c8") )
44  {
45  result = new ossimKakaduJ2kCodec();
46  }
47 
48  return result.release();
49 }
T * release()
Definition: ossimRefPtr.h:93
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48

◆ createCodec() [2/2]

ossimCodecBase * ossimKakaduCodecFactory::createCodec ( const ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

createCodec takes a type in the keywordlist and will return a new codec to encode decode image buffers

Parameters
inkwl. Type identifer used to allocate the proper codec.
inprefix. prefix used to prefix keywords during the construction of the codec
Returns
ossimCodecBase type.

Implements ossimCodecFactoryInterface.

Definition at line 51 of file ossimKakaduCodecFactory.cpp.

References createCodec(), ossimString::empty(), ossimKeywordlist::find(), ossimObject::loadState(), and ossimKeywordNames::TYPE_KW.

52 {
53  ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
54  ossimCodecBase* result = 0;
55  if(!type.empty())
56  {
57  result = this->createCodec(type);
58  if(result)
59  {
60  result->loadState(kwl, prefix);
61  }
62  }
63 
64  return result;
65 }
const char * find(const char *key) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
static const char * TYPE_KW
virtual ossimCodecBase * createCodec(const ossimString &type) const
createCodec takes a type and will return a new codec to encode decode image buffers ...
bool empty() const
Definition: ossimString.h:411

◆ getTypeNameList()

void ossimKakaduCodecFactory::getTypeNameList ( std::vector< ossimString > &  typeNames) const
virtual

Implements ossimCodecFactoryInterface.

Definition at line 67 of file ossimKakaduCodecFactory.cpp.

68 {
69  typeNames.push_back("C8");
70 }

◆ instance()

ossimKakaduCodecFactory * ossimKakaduCodecFactory::instance ( )
static
Returns
instance

Definition at line 31 of file ossimKakaduCodecFactory.cpp.

References ossimKakaduCodecFactory(), and theInstance.

Referenced by ossimSharedLibraryInitialize().

32 {
33  if ( !theInstance )
34  {
36  }
37  return theInstance;
38 }
static ossimKakaduCodecFactory * theInstance
The single instance of this class.
ossimKakaduCodecFactory()
hidden from use default constructor

◆ operator=()

const ossimKakaduCodecFactory & ossimKakaduCodecFactory::operator= ( const ossimKakaduCodecFactory rhs)
private

hidden from use operator =

Definition at line 78 of file ossimKakaduCodecFactory.cpp.

80 {
81  return *this;
82 }

Member Data Documentation

◆ theInstance

ossimKakaduCodecFactory * ossimKakaduCodecFactory::theInstance = 0
staticprivate

The single instance of this class.

Definition at line 70 of file ossimKakaduCodecFactory.h.

Referenced by instance().


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