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