2015-07-26 21:39:49 +00:00
|
|
|
#ifndef CFOURCC_H
|
|
|
|
#define CFOURCC_H
|
|
|
|
|
2015-07-27 00:54:55 +00:00
|
|
|
#include "types.h"
|
2015-07-26 21:39:49 +00:00
|
|
|
#include <FileIO/CInputStream.h>
|
|
|
|
#include <FileIO/COutputStream.h>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class CFourCC
|
|
|
|
{
|
2015-07-27 00:54:55 +00:00
|
|
|
char mFourCC[4];
|
2015-07-26 21:39:49 +00:00
|
|
|
public:
|
2015-07-27 00:54:55 +00:00
|
|
|
// Constructors
|
2015-07-26 21:39:49 +00:00
|
|
|
CFourCC();
|
|
|
|
CFourCC(const char *src);
|
|
|
|
CFourCC(const std::string& src);
|
2015-07-27 00:54:55 +00:00
|
|
|
CFourCC(u32 src);
|
2015-07-26 21:39:49 +00:00
|
|
|
CFourCC(CInputStream& src);
|
2015-07-27 00:54:55 +00:00
|
|
|
|
|
|
|
// Functionality
|
2015-07-26 21:39:49 +00:00
|
|
|
void Write(COutputStream& Output);
|
2015-07-27 00:54:55 +00:00
|
|
|
u32 ToLong() const;
|
|
|
|
std::string ToString() const;
|
|
|
|
CFourCC ToUpper() const;
|
2015-07-26 21:39:49 +00:00
|
|
|
|
2015-07-27 00:54:55 +00:00
|
|
|
// Operators
|
2015-07-26 21:39:49 +00:00
|
|
|
CFourCC& operator=(const char *src);
|
|
|
|
CFourCC& operator=(const std::string& src);
|
2015-07-27 00:54:55 +00:00
|
|
|
CFourCC& operator=(u32 src);
|
2015-07-26 21:39:49 +00:00
|
|
|
bool operator==(const CFourCC& other) const;
|
|
|
|
bool operator!=(const CFourCC& other) const;
|
2015-07-27 00:54:55 +00:00
|
|
|
bool operator>(const CFourCC& other) const;
|
|
|
|
bool operator>=(const CFourCC& other) const;
|
|
|
|
bool operator<(const CFourCC& other) const;
|
|
|
|
bool operator<=(const CFourCC& other) const;
|
2015-07-27 20:17:22 +00:00
|
|
|
char operator[](int index);
|
|
|
|
const char operator[](int index) const;
|
2015-07-26 21:39:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CFOURCC_H
|