Panda3D
|
00001 // Filename: interrogateComponent.h 00002 // Created by: drose (08Aug00) 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 INTERROGATECOMPONENT_H 00016 #define INTERROGATECOMPONENT_H 00017 00018 #include "dtoolbase.h" 00019 00020 #include "interrogate_interface.h" 00021 #include "interrogate_request.h" 00022 00023 #include <vector> 00024 00025 class IndexRemapper; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : InterrogateComponent 00029 // Description : The base class for things that are part of the 00030 // interrogate database. This includes types, 00031 // functions, and function wrappers. 00032 //////////////////////////////////////////////////////////////////// 00033 class EXPCL_DTOOLCONFIG InterrogateComponent { 00034 public: 00035 INLINE InterrogateComponent(InterrogateModuleDef *def = NULL); 00036 INLINE InterrogateComponent(const InterrogateComponent ©); 00037 INLINE void operator = (const InterrogateComponent ©); 00038 00039 INLINE bool has_library_name() const; 00040 INLINE const char *get_library_name() const; 00041 00042 INLINE bool has_module_name() const; 00043 INLINE const char *get_module_name() const; 00044 00045 INLINE bool has_name() const; 00046 INLINE const string &get_name() const; 00047 00048 INLINE int get_num_alt_names() const; 00049 INLINE const string &get_alt_name(int n) const; 00050 00051 void output(ostream &out) const; 00052 void input(istream &in); 00053 00054 protected: 00055 static string _empty_string; 00056 00057 private: 00058 InterrogateModuleDef *_def; 00059 string _name; 00060 00061 typedef vector<string> Strings; 00062 Strings _alt_names; 00063 00064 friend class InterrogateBuilder; 00065 friend class FunctionRemap; 00066 }; 00067 00068 #include "interrogateComponent.I" 00069 00070 #endif 00071 00072