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

dtool/src/cppparser/cppSimpleType.h

Go to the documentation of this file.
00001 // Filename: cppSimpleType.h
00002 // Created by:  drose (19Oct99)
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 #ifndef CPPSIMPLETYPE_H
00020 #define CPPSIMPLETYPE_H
00021 
00022 #include <dtoolbase.h>
00023 
00024 #include "cppType.h"
00025 
00026 ///////////////////////////////////////////////////////////////////
00027 //       Class : CPPSimpleType
00028 // Description :
00029 ////////////////////////////////////////////////////////////////////
00030 class CPPSimpleType : public CPPType {
00031 public:
00032   enum Type {
00033     T_bool,
00034     T_char,
00035     T_int,
00036     T_float,
00037     T_double,
00038     T_void,
00039     T_unknown,
00040   };
00041 
00042   enum Flags {
00043     F_long      = 0x001,
00044     F_longlong  = 0x002,
00045     F_short     = 0x004,
00046     F_unsigned  = 0x008,
00047     F_signed    = 0x010,
00048   };
00049 
00050   CPPSimpleType(Type type, int flags = 0);
00051 
00052   Type _type;
00053   int _flags;
00054 
00055   virtual bool is_tbd() const;
00056 
00057   virtual string get_preferred_name() const;
00058 
00059   virtual void output(ostream &out, int indent_level, CPPScope *scope,
00060                       bool complete) const;
00061   virtual SubType get_subtype() const;
00062 
00063   virtual CPPSimpleType *as_simple_type();
00064 
00065 protected:
00066   virtual bool is_equal(const CPPDeclaration *other) const;
00067   virtual bool is_less(const CPPDeclaration *other) const;
00068 };
00069 
00070 #endif

Generated on Thu May 1 22:12:55 2003 for DTool by doxygen1.3