00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef IFFID_H
00016 #define IFFID_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "numeric_types.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029 class IffId {
00030 public:
00031 INLINE IffId();
00032 INLINE IffId(const char id[4]);
00033 INLINE IffId(const IffId ©);
00034 INLINE void operator = (const IffId ©);
00035
00036 INLINE bool operator == (const IffId &other) const;
00037 INLINE bool operator != (const IffId &other) const;
00038 INLINE bool operator < (const IffId &other) const;
00039
00040 INLINE string get_name() const;
00041
00042 void output(ostream &out) const;
00043
00044 private:
00045 union {
00046 PN_uint32 _n;
00047 char _c[4];
00048 } _id;
00049 };
00050
00051 #include "iffId.I"
00052
00053 INLINE ostream &operator << (ostream &out, const IffId &id) {
00054 id.output(out);
00055 return out;
00056 }
00057
00058 #endif