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

defrange.h

Go to the documentation of this file.
00001 
00002 //
00003 //  Borland C++ 5.5, GNU C++ 3.0
00004 //  Compiler Backend Library
00005 //  $Id: defrange_8h-source.html,v 1.1 2002/07/18 14:58:45 cparpart Exp $
00006 //
00007 //  Copyright (c) 2000-2002 SurakWare Corp.
00008 //
00010 #ifndef sw_cbl_codetree_defrange_h
00011 #define sw_cbl_codetree_defrange_h
00012 
00013 #include 
00014 #include 
00015 
00016 namespace cbl {
00017 namespace codetree {
00018 namespace def {
00019 
00020 // TRangeDef
00021 class TRangeDef : public TDef {
00022 public:
00023     enum TBaseType {
00024         btAuto, btEnum, btVoid,
00025         btBool8, btBool16, btBool32,
00026         btChar8, btChar16,
00027         btUInt8, btInt8,
00028         btUInt16, btInt16,
00029         btUInt32, btInt32,
00030         btUInt64, btInt64
00031     };
00032 
00033 private:
00034     crosspl::int64 FMin, FMax;
00035     TBaseType FBaseType;
00036     unsigned FSize;
00037 
00038     void calcSize();
00039 
00040 protected:
00041     void baseType(TBaseType ABaseType);
00042 
00043     TRangeDef(symbols::TModuleSym *AOwner, crosspl::int64 AMin, crosspl::int64 AMax, TBaseType ABaseType = btAuto);
00044     TRangeDef(symbols::TModuleSym *AOwner, TBaseType ABaseType);
00045 
00046     friend class symbols::TModuleSym;
00047 
00048 public:
00049     TRangeDef(const TRangeDef&);
00050     ~TRangeDef();
00051 
00052     // size
00053     virtual unsigned size() const;
00054 
00055     // access to FBaseType
00056     TBaseType baseType() const;
00057 
00058     bool isInteger() const;
00059     bool isChar() const;
00060     bool isBoolean() const;
00061 
00062     // access to FMin
00063     void min(crosspl::int64);
00064     crosspl::int64 min() const;
00065 
00066     // access to FMax
00067     void max(crosspl::int64);
00068     crosspl::int64 max() const;
00069 
00070     // visitor pattern
00071     virtual void accept(TDefVisitor&);
00072 
00073     // object cloning
00074     virtual TRangeDef *clone() const;
00075 };
00076 
00077 } // namespace def
00078 } // namespace codetree
00079 } // namespace cbl
00080 
00081 #endif

Generated on Sat Apr 6 19:07:25 2002 for Compiler Backend Library by doxygen1.2.14 written by , © 1997-2002