Panda3D
interrogateComponent.h
1 // Filename: interrogateComponent.h
2 // Created by: drose (08Aug00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef INTERROGATECOMPONENT_H
16 #define INTERROGATECOMPONENT_H
17 
18 #include "dtoolbase.h"
19 
20 #include "interrogate_interface.h"
21 #include "interrogate_request.h"
22 
23 #include <vector>
24 
25 class IndexRemapper;
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : InterrogateComponent
29 // Description : The base class for things that are part of the
30 // interrogate database. This includes types,
31 // functions, and function wrappers.
32 ////////////////////////////////////////////////////////////////////
33 class EXPCL_DTOOLCONFIG InterrogateComponent {
34 public:
35  INLINE InterrogateComponent(InterrogateModuleDef *def = NULL);
36  INLINE InterrogateComponent(const InterrogateComponent &copy);
37  INLINE void operator = (const InterrogateComponent &copy);
38 
39  INLINE bool has_library_name() const;
40  INLINE const char *get_library_name() const;
41 
42  INLINE bool has_module_name() const;
43  INLINE const char *get_module_name() const;
44 
45  INLINE bool has_name() const;
46  INLINE const string &get_name() const;
47 
48  INLINE int get_num_alt_names() const;
49  INLINE const string &get_alt_name(int n) const;
50 
51  void output(ostream &out) const;
52  void input(istream &in);
53 
54 protected:
55  static string _empty_string;
56 
57 private:
59  string _name;
60 
61  typedef vector<string> Strings;
62  Strings _alt_names;
63 
64  friend class InterrogateBuilder;
65  friend class FunctionRemap;
66 };
67 
68 #include "interrogateComponent.I"
69 
70 #endif
71 
72 
This class manages a mapping of integers to integers.
Definition: indexRemapper.h:33
The base class for things that are part of the interrogate database.