Magick::CoderInfo::CoderInfo ( void )
: _name(),
_description(),
+ _mimeType(),
_isReadable(false),
_isWritable(false),
_isMultiFrame(false)
{
_name = coder_._name;
_description = coder_._description;
+ _mimeType = coder_._mimeType;
_isReadable = coder_._isReadable;
_isWritable = coder_._isWritable;
_isMultiFrame = coder_._isMultiFrame;
Magick::CoderInfo::CoderInfo ( const std::string &name_ )
: _name(),
_description(),
+ _mimeType(),
_isReadable(false),
_isWritable(false),
_isMultiFrame(false)
{
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
- const Magick::MagickInfo *magickInfo = GetMagickInfo( name_.c_str(), &exceptionInfo );
+ const Magick::MagickInfo *magickInfo = GetMagickInfo( name_.c_str(),
+ &exceptionInfo );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
if( magickInfo == 0 )
{
_name = string(magickInfo->name);
_description = string(magickInfo->description);
+ _mimeType = string(magickInfo->mime_type);
_isReadable = ((magickInfo->decoder == 0) ? false : true);
_isWritable = ((magickInfo->encoder == 0) ? false : true);
_isMultiFrame = ((magickInfo->adjoin == 0) ? false : true);
// Nothing to do
}
-// Format name
-std::string Magick::CoderInfo::name( void ) const
-{
- return _name;
-}
-
// Format description
std::string Magick::CoderInfo::description( void ) const
{
return _isMultiFrame;
}
+// Format mime type
+std::string Magick::CoderInfo::mimeType( void ) const
+{
+ return _mimeType;
+}
+
+// Format name
+std::string Magick::CoderInfo::name( void ) const
+{
+ return _name;
+}
+
// Assignment operator
-Magick::CoderInfo& Magick::CoderInfo::operator= (const CoderInfo &coder_ )
+Magick::CoderInfo& Magick::CoderInfo::operator= ( const CoderInfo &coder_ )
{
// If not being set to ourself
if (this != &coder_)
{
_name = coder_._name;
_description = coder_._description;
+ _mimeType = coder_._mimeType;
_isReadable = coder_._isReadable;
_isWritable = coder_._isWritable;
_isMultiFrame = coder_._isMultiFrame;
Magick::CoderInfo::CoderInfo ( const MagickCore::MagickInfo *magickInfo_ )
: _name(string(magickInfo_->name ? magickInfo_->name : "")),
_description(string(magickInfo_->description ? magickInfo_->description : "")),
+ _mimeType(string(magickInfo_->mime_type ? magickInfo_->mime_type : "")),
_isReadable(magickInfo_->decoder ? true : false),
_isWritable(magickInfo_->encoder ? true : false),
_isMultiFrame(magickInfo_->adjoin ? true : false)
public:
enum MatchType {
- AnyMatch, // match any coder
- TrueMatch, // match coder if true
- FalseMatch // match coder if false
+ AnyMatch, // match any coder
+ TrueMatch, // match coder if true
+ FalseMatch // match coder if false
};
// Default constructor
// Destructor
~CoderInfo ( void );
- // Format name
- std::string name( void ) const;
-
// Format description
std::string description( void ) const;
+ // Format supports multiple frames
+ bool isMultiFrame( void ) const;
+
// Format is readable
bool isReadable( void ) const;
// Format is writeable
bool isWritable( void ) const;
- // Format supports multiple frames
- bool isMultiFrame( void ) const;
+ // Format mime type
+ std::string mimeType( void ) const;
+
+ // Format name
+ std::string name( void ) const;
// Assignment operator
- CoderInfo& operator= (const CoderInfo &coder_ );
+ CoderInfo& operator= ( const CoderInfo &coder_ );
//
// Implemementation methods
private:
- std::string _name;
- std::string _description;
- bool _isReadable;
- bool _isWritable;
- bool _isMultiFrame;
-
+ std::string _description;
+ bool _isReadable;
+ bool _isWritable;
+ bool _isMultiFrame;
+ std::string _mimeType;
+ std::string _name;
+
};
} // namespace Magick