65 void init(
const std::string &key) {
66 if(key.length() != 4)
throw utils::ICLException(
"FourCC::FourCC(string): invalid fourcc code " + key);
67 if(key ==
"null") this->key = 0;
79 if(!key)
return "null";
81 return std::string((
char*)tmp);
90 operator bool() {
return key != 0; }
93 operator int() {
return asInt(); }
98 return stream <<
"FourCC(" << fourCC.
asString() <<
")" << std::endl;
undocument this line if you encounter any issues!
Definition: Any.h:37
icl32s key
internally a fourcc is represented by an u-int value
Definition: FourCC.h:45
icl32s asInt() const
obtain current key (uint)
Definition: FourCC.h:85
Ipp32s icl32s
32bit signed integer type for the ICL
Definition: BasicTypes.h:58
#define ICLIO_API
Definition: CompatMacros.h:176
FourCC(const std::string &key)
create a fourCC from given string color code (e.g. Y422 or MJPG)
Definition: FourCC.h:55
FourCC & operator=(const std::string &key)
std::string-assignment
Definition: FourCC.h:75
FourCC()
create a null FourCC (key = 0)
Definition: FourCC.h:49
FourCC & operator=(icl32s key)
int-assignment
Definition: FourCC.h:72
uint32_t icl32u
32bit unsigned integer type for the ICL
Definition: BasicTypes.h:88
Wrapper class for fourcc color codes.
Definition: FourCC.h:44
Base class for Exception handling in the ICL.
Definition: Exception.h:42
std::ostream & operator<<(std::ostream &stream, const FourCC &fourCC)
overloaded ostream operator for type fourCC
Definition: FourCC.h:97
void init(const std::string &key)
initialization utility method
Definition: FourCC.h:65
std::string asString() const
convert to string
Definition: FourCC.h:78
FourCC(const char *key)
create a fourCC from given string color code (cstring style)
Definition: FourCC.h:60
FourCC(icl32s key)
create a FourCC with given key
Definition: FourCC.h:52