Panda3D
|
00001 // Filename: dcTypedef.h 00002 // Created by: drose (17Jun04) 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 DCTYPEDEF_H 00016 #define DCTYPEDEF_H 00017 00018 #include "dcbase.h" 00019 #include "dcDeclaration.h" 00020 00021 class DCParameter; 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : DCTypedef 00025 // Description : This represents a single typedef declaration in the 00026 // dc file. It assigns a particular type to a new name, 00027 // just like a C typedef. 00028 //////////////////////////////////////////////////////////////////// 00029 class EXPCL_DIRECT DCTypedef : public DCDeclaration { 00030 public: 00031 DCTypedef(DCParameter *parameter, bool implicit = false); 00032 DCTypedef(const string &name); 00033 virtual ~DCTypedef(); 00034 00035 PUBLISHED: 00036 int get_number() const; 00037 const string &get_name() const; 00038 string get_description() const; 00039 00040 bool is_bogus_typedef() const; 00041 bool is_implicit_typedef() const; 00042 00043 public: 00044 DCParameter *make_new_parameter() const; 00045 00046 void set_number(int number); 00047 virtual void output(ostream &out, bool brief) const; 00048 virtual void write(ostream &out, bool brief, int indent_level) const; 00049 00050 private: 00051 DCParameter *_parameter; 00052 bool _bogus_typedef; 00053 bool _implicit_typedef; 00054 int _number; 00055 }; 00056 00057 #endif