Magick++ 7.1.1
Loading...
Searching...
No Matches
Magick::CoderInfo Class Reference
Collaboration diagram for Magick::CoderInfo:

Public Types

enum  MatchType { AnyMatch , TrueMatch , FalseMatch }
 

Public Member Functions

 CoderInfo (const CoderInfo &coder_)
 
 CoderInfo (const std::string &name_)
 
CoderInfooperator= (const CoderInfo &coder_)
 
bool canReadMultithreaded (void) const
 
bool canWriteMultithreaded (void) const
 
std::string description (void) const
 
bool isMultiFrame (void) const
 
bool isReadable (void) const
 
bool isWritable (void) const
 
std::string mimeType (void) const
 
std::string module (void) const
 
std::string name (void) const
 
bool unregister (void) const
 

Private Attributes

bool _decoderThreadSupport
 
std::string _description
 
bool _encoderThreadSupport
 
bool _isMultiFrame
 
bool _isReadable
 
bool _isWritable
 
std::string _mimeType
 
std::string _module
 
std::string _name
 

Detailed Description

Definition at line 21 of file CoderInfo.h.

Member Enumeration Documentation

◆ MatchType

enum Magick::CoderInfo::MatchType

Definition at line 25 of file CoderInfo.h.

25 {
26 AnyMatch, // match any coder
27 TrueMatch, // match coder if true
28 FalseMatch // match coder if false
29 };

Constructor & Destructor Documentation

◆ CoderInfo() [1/3]

Magick::CoderInfo::CoderInfo ( void  )

Definition at line 20 of file CoderInfo.cpp.

21 : _decoderThreadSupport(false),
22 _description(),
23 _encoderThreadSupport(false),
24 _isMultiFrame(false),
25 _isReadable(false),
26 _isWritable(false),
27 _mimeType(),
28 _module(),
29 _name()
30{
31}

◆ CoderInfo() [2/3]

Magick::CoderInfo::CoderInfo ( const CoderInfo coder_)

Definition at line 33 of file CoderInfo.cpp.

34 : _decoderThreadSupport(coder_._decoderThreadSupport),
35 _description(coder_._description),
36 _encoderThreadSupport(coder_._encoderThreadSupport),
37 _isMultiFrame(coder_._isMultiFrame),
38 _isReadable(coder_._isReadable),
39 _isWritable(coder_._isWritable),
40 _mimeType(coder_._mimeType),
41 _module(coder_._module),
42 _name(coder_._name)
43{
44}

◆ CoderInfo() [3/3]

Magick::CoderInfo::CoderInfo ( const std::string &  name_)

Definition at line 46 of file CoderInfo.cpp.

47 : _decoderThreadSupport(false),
48 _description(),
49 _encoderThreadSupport(false),
50 _isMultiFrame(false),
51 _isReadable(false),
52 _isWritable(false),
53 _mimeType(),
54 _module(),
55 _name()
56{
57 const Magick::MagickInfo
58 *magickInfo;
59
60 GetPPException;
61 magickInfo=GetMagickInfo(name_.c_str(),exceptionInfo);
62 ThrowPPException(false);
63 if (magickInfo == 0)
64 throwExceptionExplicit(MagickCore::OptionError,"Coder not found",
65 name_.c_str());
66 else
67 {
68 _decoderThreadSupport=(GetMagickDecoderThreadSupport(magickInfo) ==
69 MagickTrue) ? true : false;
70 _description=std::string(magickInfo->description);
71 _encoderThreadSupport=(GetMagickEncoderThreadSupport(magickInfo) ==
72 MagickTrue) ? true : false;
73 _isMultiFrame=(GetMagickAdjoin(magickInfo) == MagickTrue) ? true : false;
74 _isReadable=((magickInfo->decoder == (MagickCore::DecodeImageHandler *)
75 NULL) ? false : true);
76 _isWritable=((magickInfo->encoder == (MagickCore::EncodeImageHandler *)
77 NULL) ? false : true);
78 _mimeType=std::string(magickInfo->mime_type != (char *) NULL ?
79 magickInfo->mime_type : "");
80 _module=std::string(magickInfo->magick_module);
81 _name=std::string(magickInfo->name);
82 }
83}

◆ ~CoderInfo()

Magick::CoderInfo::~CoderInfo ( void  )

Definition at line 85 of file CoderInfo.cpp.

86{
87}

Member Function Documentation

◆ canReadMultithreaded()

bool Magick::CoderInfo::canReadMultithreaded ( void  ) const

Definition at line 107 of file CoderInfo.cpp.

108{
109 return(_decoderThreadSupport);
110}

◆ canWriteMultithreaded()

bool Magick::CoderInfo::canWriteMultithreaded ( void  ) const

Definition at line 112 of file CoderInfo.cpp.

113{
114 return(_encoderThreadSupport);
115}

◆ description()

std::string Magick::CoderInfo::description ( void  ) const

Definition at line 117 of file CoderInfo.cpp.

118{
119 return(_description);
120}

◆ isMultiFrame()

bool Magick::CoderInfo::isMultiFrame ( void  ) const

Definition at line 132 of file CoderInfo.cpp.

133{
134 return(_isMultiFrame);
135}

◆ isReadable()

bool Magick::CoderInfo::isReadable ( void  ) const

Definition at line 122 of file CoderInfo.cpp.

123{
124 return(_isReadable);
125}

◆ isWritable()

bool Magick::CoderInfo::isWritable ( void  ) const

Definition at line 127 of file CoderInfo.cpp.

128{
129 return(_isWritable);
130}

◆ mimeType()

std::string Magick::CoderInfo::mimeType ( void  ) const

Definition at line 137 of file CoderInfo.cpp.

138{
139 return(_mimeType);
140}

◆ module()

std::string Magick::CoderInfo::module ( void  ) const

Definition at line 142 of file CoderInfo.cpp.

143{
144 return(_module);
145}

◆ name()

std::string Magick::CoderInfo::name ( void  ) const

Definition at line 147 of file CoderInfo.cpp.

148{
149 return(_name);
150}

◆ operator=()

Magick::CoderInfo & Magick::CoderInfo::operator= ( const CoderInfo coder_)

Definition at line 89 of file CoderInfo.cpp.

90{
91 // If not being set to ourself
92 if (this != &coder_)
93 {
94 _decoderThreadSupport=coder_._decoderThreadSupport;
95 _description=coder_._description;
96 _encoderThreadSupport=coder_._encoderThreadSupport;
97 _isMultiFrame=coder_._isMultiFrame;
98 _isReadable=coder_._isReadable;
99 _isWritable=coder_._isWritable;
100 _mimeType=coder_._mimeType;
101 _module=coder_._module;
102 _name=coder_._name;
103 }
104 return(*this);
105}

◆ unregister()

bool Magick::CoderInfo::unregister ( void  ) const

Definition at line 152 of file CoderInfo.cpp.

153{
154 return(UnregisterMagickInfo(_name.c_str()) != MagickFalse);
155}

Member Data Documentation

◆ _decoderThreadSupport

bool Magick::CoderInfo::_decoderThreadSupport
private

Definition at line 77 of file CoderInfo.h.

◆ _description

std::string Magick::CoderInfo::_description
private

Definition at line 78 of file CoderInfo.h.

◆ _encoderThreadSupport

bool Magick::CoderInfo::_encoderThreadSupport
private

Definition at line 79 of file CoderInfo.h.

◆ _isMultiFrame

bool Magick::CoderInfo::_isMultiFrame
private

Definition at line 80 of file CoderInfo.h.

◆ _isReadable

bool Magick::CoderInfo::_isReadable
private

Definition at line 81 of file CoderInfo.h.

◆ _isWritable

bool Magick::CoderInfo::_isWritable
private

Definition at line 82 of file CoderInfo.h.

◆ _mimeType

std::string Magick::CoderInfo::_mimeType
private

Definition at line 83 of file CoderInfo.h.

◆ _module

std::string Magick::CoderInfo::_module
private

Definition at line 84 of file CoderInfo.h.

◆ _name

std::string Magick::CoderInfo::_name
private

Definition at line 85 of file CoderInfo.h.


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