Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

dtool/src/interrogatedb/interrogateElement.I

Go to the documentation of this file.
00001 // Filename: interrogateElement.I
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 
00020 ////////////////////////////////////////////////////////////////////
00021 //     Element: InterrogateElement::Constructor
00022 //       Access: Public
00023 //  Description:
00024 ////////////////////////////////////////////////////////////////////
00025 INLINE InterrogateElement::
00026 InterrogateElement(InterrogateModuleDef *def) :
00027   InterrogateComponent(def)
00028 {
00029   _flags = 0;
00030   _type = 0;
00031   _getter = 0;
00032   _setter = 0;
00033 }
00034 
00035 ////////////////////////////////////////////////////////////////////
00036 //     Element: InterrogateElement::Copy Constructor
00037 //       Access: Public
00038 //  Description:
00039 ////////////////////////////////////////////////////////////////////
00040 INLINE InterrogateElement::
00041 InterrogateElement(const InterrogateElement &copy) {
00042   (*this) = copy;
00043 }
00044 
00045 ////////////////////////////////////////////////////////////////////
00046 //     Element: InterrogateElement::Copy Assignment Operator
00047 //       Access: Public
00048 //  Description:
00049 ////////////////////////////////////////////////////////////////////
00050 INLINE void InterrogateElement::
00051 operator = (const InterrogateElement &copy) {
00052   InterrogateComponent::operator = (copy);
00053   _flags = copy._flags;
00054   _scoped_name = copy._scoped_name;
00055   _type = copy._type;
00056   _getter = copy._getter;
00057   _setter = copy._setter;
00058 }
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 //     Function: InterrogateElement::is_global
00062 //       Access: Public
00063 //  Description: Returns true if the element is marked as 'global'.
00064 //               This means only that it should appear in the global
00065 //               element list.
00066 ////////////////////////////////////////////////////////////////////
00067 INLINE bool InterrogateElement::
00068 is_global() const {
00069   return (_flags & F_global) != 0;
00070 }
00071 
00072 ////////////////////////////////////////////////////////////////////
00073 //     Function: InterrogateElement::has_scoped_name
00074 //       Access: Public
00075 //  Description:
00076 ////////////////////////////////////////////////////////////////////
00077 INLINE bool InterrogateElement::
00078 has_scoped_name() const {
00079   return !_scoped_name.empty();
00080 }
00081 
00082 ////////////////////////////////////////////////////////////////////
00083 //     Function: InterrogateElement::get_scoped_name
00084 //       Access: Public
00085 //  Description:
00086 ////////////////////////////////////////////////////////////////////
00087 INLINE const string &InterrogateElement::
00088 get_scoped_name() const {
00089   return _scoped_name;
00090 }
00091 
00092 ////////////////////////////////////////////////////////////////////
00093 //     Element: InterrogateElement::get_type
00094 //       Access: Public
00095 //  Description:
00096 ////////////////////////////////////////////////////////////////////
00097 INLINE TypeIndex InterrogateElement::
00098 get_type() const {
00099   return _type;
00100 }
00101 
00102 ////////////////////////////////////////////////////////////////////
00103 //     Element: InterrogateElement::has_getter
00104 //       Access: Public
00105 //  Description:
00106 ////////////////////////////////////////////////////////////////////
00107 INLINE bool InterrogateElement::
00108 has_getter() const {
00109   return (_flags & F_has_getter) != 0;
00110 }
00111 
00112 ////////////////////////////////////////////////////////////////////
00113 //     Element: InterrogateElement::get_getter
00114 //       Access: Public
00115 //  Description:
00116 ////////////////////////////////////////////////////////////////////
00117 INLINE FunctionIndex InterrogateElement::
00118 get_getter() const {
00119   return _getter;
00120 }
00121 
00122 ////////////////////////////////////////////////////////////////////
00123 //     Element: InterrogateElement::has_setter
00124 //       Access: Public
00125 //  Description:
00126 ////////////////////////////////////////////////////////////////////
00127 INLINE bool InterrogateElement::
00128 has_setter() const {
00129   return (_flags & F_has_setter) != 0;
00130 }
00131 
00132 ////////////////////////////////////////////////////////////////////
00133 //     Element: InterrogateElement::get_setter
00134 //       Access: Public
00135 //  Description:
00136 ////////////////////////////////////////////////////////////////////
00137 INLINE FunctionIndex InterrogateElement::
00138 get_setter() const {
00139   return _setter;
00140 }
00141 
00142 
00143 INLINE ostream &
00144 operator << (ostream &out, const InterrogateElement &element) {
00145   element.output(out);
00146   return out;
00147 }
00148 
00149 INLINE istream &
00150 operator >> (istream &in, InterrogateElement &element) {
00151   element.input(in);
00152   return in;
00153 }

Generated on Thu May 1 22:13:06 2003 for DTool by doxygen1.3