Panda3D
|
00001 // Filename: interrogateManifest.h 00002 // Created by: drose (11Aug00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef INTERROGATEMANIFEST_H 00016 #define INTERROGATEMANIFEST_H 00017 00018 #include "dtoolbase.h" 00019 00020 #include "interrogateComponent.h" 00021 00022 class IndexRemapper; 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : InterrogateManifest 00026 // Description : An internal representation of a manifest constant. 00027 //////////////////////////////////////////////////////////////////// 00028 class EXPCL_DTOOLCONFIG InterrogateManifest : public InterrogateComponent { 00029 public: 00030 INLINE InterrogateManifest(InterrogateModuleDef *def = NULL); 00031 INLINE InterrogateManifest(const InterrogateManifest ©); 00032 INLINE void operator = (const InterrogateManifest ©); 00033 00034 INLINE const string &get_definition() const; 00035 INLINE bool has_type() const; 00036 INLINE TypeIndex get_type() const; 00037 INLINE bool has_getter() const; 00038 INLINE FunctionIndex get_getter() const; 00039 INLINE bool has_int_value() const; 00040 INLINE int get_int_value() const; 00041 00042 void output(ostream &out) const; 00043 void input(istream &in); 00044 00045 void remap_indices(const IndexRemapper &remap); 00046 00047 private: 00048 enum Flags { 00049 F_has_type = 0x0001, 00050 F_has_getter = 0x0002, 00051 F_has_int_value = 0x0004 00052 }; 00053 00054 int _flags; 00055 string _definition; 00056 int _int_value; 00057 TypeIndex _type; 00058 FunctionIndex _getter; 00059 00060 friend class InterrogateBuilder; 00061 }; 00062 00063 INLINE ostream &operator << (ostream &out, const InterrogateManifest &manifest); 00064 INLINE istream &operator >> (istream &in, InterrogateManifest &manifest); 00065 00066 #include "interrogateManifest.I" 00067 00068 #endif