EnumerationLiteral.hh

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 // Copyright (c) 1995-2005 Ohio Board of Regents and the University of
00003 // Cincinnati.  All Rights Reserved.
00004 
00005 // You may modify, distribute, and use the software contained in this package
00006 // under the terms of the "GNU LIBRARY GENERAL PUBLIC LICENSE" version 2,
00007 // June 1991. A copy of this license agreement can be found in the file
00008 // "LGPL", distributed with this archive.
00009 
00010 //---------------------------------------------------------------------------
00011 
00012 #ifndef ENUMERATION_LITERAL_HH
00013 #define ENUMERATION_LITERAL_HH
00014 
00015 #include "tyvis/IntegerLiteral.hh"
00016 class EnumerationTypeInfo;
00017 class TypeInfo;
00018 
00019 class EnumerationLiteral: public IntegerLiteral {
00020 public:
00021   EnumerationLiteral();
00022   EnumerationLiteral(const EnumerationLiteral&);
00023 
00024   EnumerationLiteral( const EnumerationTypeInfo &,
00025                       const string &value );
00026 
00027   EnumerationLiteral( const EnumerationTypeInfo &,
00028                       int value );
00029 
00030   EnumerationLiteral( const EnumerationTypeInfo &,
00031                       const RValue &value );
00032   
00033   EnumerationLiteral( const EnumerationTypeInfo & );
00034 
00035   virtual ~EnumerationLiteral();
00036 
00037   RValue &operator=( const RValue & );
00038   EnumerationLiteral &operator=( const EnumerationLiteral & );
00039 
00040   const EnumerationLiteral &leftValue();
00041 
00042   Value vhdlAnd( const RValue &rhs ) const;
00043   Value vhdlNot() const;
00044   Value vhdlOr( const RValue & ) const;
00045   Value vhdlNand( const RValue & ) const;
00046   Value vhdlNor( const RValue & ) const;
00047   Value vhdlXor( const RValue & ) const;
00048   Value vhdlXnor( const RValue & ) const;
00049   
00050   Value vhdlPlus( const RValue & ) const;
00051   Value vhdlMinus( const RValue & ) const;
00052   Value vhdlMultiply( const RValue & ) const;
00053   Value vhdlDivide( const RValue & ) const;
00054   Value vhdlMod( const RValue & ) const;
00055   Value vhdlRem( const RValue & ) const;
00056   Value vhdlPow( const RValue & ) const;
00057 
00058   static const EnumerationLiteral &getEnumerationZero();
00059   static const EnumerationLiteral &getEnumerationOne();
00060   static const EnumerationLiteral &getEnumerationTrue();
00061   static const EnumerationLiteral &getEnumerationFalse();
00062   static const EnumerationLiteral &getEnumerationReadMode();
00063   static const EnumerationLiteral &getEnumerationWriteMode();
00064 
00065   static const EnumerationLiteral &toBoolean( const RValue &toConvert );
00066   static const EnumerationLiteral &toBoolean( bool toConvert );
00067 
00068   const TypeInfo &getTypeInfo() const;
00069 
00070   RValue *clone() const;
00071 
00072   const string &getDataType() const;
00073   static const string &getEnumerationLiteralDataType();
00074   void serialize( SerializedInstance * ) const;
00075 
00076   void print( ostream &os ) const;
00077   string toString() const;
00078 
00079 private:
00080   const EnumerationTypeInfo *myTypeInfo;
00081 };
00082 
00083 #endif

Generated on Fri Mar 31 11:05:08 2006 for Tyvis by  doxygen 1.4.6