• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This may look like C code, but it is really -*- C++ -*-
2 //
3 // Copyright Bob Friesenhahn, 2001, 2002
4 // Copyright Dirk Lemstra 2013-2015
5 //
6 // CoderInfo Definition
7 //
8 // Container for image format support information.
9 //
10 
11 #if !defined (Magick_CoderInfo_header)
12 #define Magick_CoderInfo_header  1
13 
14 #include "Magick++/Include.h"
15 #include <string>
16 
17 namespace Magick
18 {
19   class MagickPPExport CoderInfo
20   {
21   public:
22 
23     enum MatchType {
24       AnyMatch,  // match any coder
25       TrueMatch, // match coder if true
26       FalseMatch // match coder if false
27     };
28 
29     // Default constructor
30     CoderInfo(void);
31 
32     // Copy constructor
33     CoderInfo(const CoderInfo &coder_);
34 
35     // Construct with coder name
36     CoderInfo(const std::string &name_);
37 
38     // Destructor
39     ~CoderInfo(void);
40 
41     // Assignment operator
42     CoderInfo& operator=(const CoderInfo &coder_);
43 
44     // Format can read multi-threaded
45     bool canReadMultithreaded(void) const;
46 
47     // Format can write multi-threaded
48     bool canWriteMultithreaded(void) const;
49 
50     // Format description
51     std::string description(void) const;
52 
53     // Format supports multiple frames
54     bool isMultiFrame(void) const;
55 
56     // Format is readable
57     bool isReadable(void) const;
58 
59     // Format is writeable
60     bool isWritable(void) const;
61 
62     // Format mime type
63     std::string mimeType(void) const;
64 
65     // Name of the module
66     std::string module(void) const;
67 
68     // Format name
69     std::string name(void) const;
70 
71     // Unregisters this coder
72     bool unregister(void) const;
73 
74   private:
75     bool        _decoderThreadSupport;
76     std::string _description;
77     bool        _encoderThreadSupport;
78     bool        _isMultiFrame;
79     bool        _isReadable;
80     bool        _isWritable;
81     std::string _mimeType;
82     std::string _module;
83     std::string _name;
84   };
85 
86 } // namespace Magick
87 
88 #endif // Magick_CoderInfo_header
89