Panda3D
interrogateManifest.I
1 // Filename: interrogateManifest.I
2 // Created by: drose (11Aug00)
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: InterrogateManifest::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE InterrogateManifest::
22 InterrogateManifest(InterrogateModuleDef *def) :
24 {
25  _flags = 0;
26  _int_value = 0;
27  _type = 0;
28  _getter = 0;
29 }
30 
31 ////////////////////////////////////////////////////////////////////
32 // Function: InterrogateManifest::Copy Constructor
33 // Access: Public
34 // Description:
35 ////////////////////////////////////////////////////////////////////
36 INLINE InterrogateManifest::
37 InterrogateManifest(const InterrogateManifest &copy) {
38  (*this) = copy;
39 }
40 
41 ////////////////////////////////////////////////////////////////////
42 // Function: InterrogateManifest::Copy Assignment Operator
43 // Access: Public
44 // Description:
45 ////////////////////////////////////////////////////////////////////
46 INLINE void InterrogateManifest::
47 operator = (const InterrogateManifest &copy) {
48  InterrogateComponent::operator = (copy);
49  _flags = copy._flags;
50  _definition = copy._definition;
51  _int_value = copy._int_value;
52  _type = copy._type;
53  _getter = copy._getter;
54 }
55 
56 
57 ////////////////////////////////////////////////////////////////////
58 // Function: InterrogateManifest::get_definition
59 // Access: Public
60 // Description:
61 ////////////////////////////////////////////////////////////////////
62 INLINE const string &InterrogateManifest::
63 get_definition() const {
64  return _definition;
65 }
66 
67 ////////////////////////////////////////////////////////////////////
68 // Function: InterrogateManifest::has_type
69 // Access: Public
70 // Description:
71 ////////////////////////////////////////////////////////////////////
72 INLINE bool InterrogateManifest::
73 has_type() const {
74  return (_flags & F_has_type) != 0;
75 }
76 
77 ////////////////////////////////////////////////////////////////////
78 // Function: InterrogateManifest::get_type
79 // Access: Public
80 // Description:
81 ////////////////////////////////////////////////////////////////////
82 INLINE TypeIndex InterrogateManifest::
83 get_type() const {
84  return _type;
85 }
86 
87 ////////////////////////////////////////////////////////////////////
88 // Function: InterrogateManifest::has_getter
89 // Access: Public
90 // Description:
91 ////////////////////////////////////////////////////////////////////
92 INLINE bool InterrogateManifest::
93 has_getter() const {
94  return (_flags & F_has_getter) != 0;
95 }
96 
97 ////////////////////////////////////////////////////////////////////
98 // Function: InterrogateManifest::get_getter
99 // Access: Public
100 // Description:
101 ////////////////////////////////////////////////////////////////////
102 INLINE FunctionIndex InterrogateManifest::
103 get_getter() const {
104  return _getter;
105 }
106 
107 ////////////////////////////////////////////////////////////////////
108 // Function: InterrogateManifest::has_int_value
109 // Access: Public
110 // Description:
111 ////////////////////////////////////////////////////////////////////
112 INLINE bool InterrogateManifest::
113 has_int_value() const {
114  return (_flags & F_has_int_value) != 0;
115 }
116 
117 ////////////////////////////////////////////////////////////////////
118 // Function: InterrogateManifest::get_int_value
119 // Access: Public
120 // Description:
121 ////////////////////////////////////////////////////////////////////
122 INLINE int InterrogateManifest::
123 get_int_value() const {
124  return _int_value;
125 }
126 
127 
128 INLINE ostream &
129 operator << (ostream &out, const InterrogateManifest &manifest) {
130  manifest.output(out);
131  return out;
132 }
133 
134 INLINE istream &
135 operator >> (istream &in, InterrogateManifest &manifest) {
136  manifest.input(in);
137  return in;
138 }
An internal representation of a manifest constant.
The base class for things that are part of the interrogate database.
void output(ostream &out) const
Formats the InterrogateManifest data for output to a data file.
void input(istream &in)
Reads the data file as previously formatted by output().