Alias.hh

Go to the documentation of this file.
00001 #ifndef ALIAS_HH
00002 #define ALIAS_HH
00003 
00004 //---------------------------------------------------------------------------
00005 // Copyright (c) 2003-2005 Clifton Labs, Inc.  All Rights Reserved.
00006 
00007 // You may modify, distribute, and use the software contained in this package
00008 // under the terms of the "GNU LIBRARY GENERAL PUBLIC LICENSE" version 2,
00009 // June 1991. A copy of this license agreement can be found in the file
00010 // "LGPL", distributed with this archive.
00011 //---------------------------------------------------------------------------
00012 
00013 
00014 #include <iostream>
00015 using std::ostream;
00016 #include <string>
00017 using std::string;
00018 
00019 #include "tyvis/LValue.hh"
00020 
00021 class TypeInfo;
00022 class EnumerationLiteral;
00023 
00032 class Alias : public LValue {
00033 public:
00038   Alias( const RValue &initObject );
00042   Alias( const Alias &that );
00043   virtual ~Alias();
00044 
00045   const RValue &readVal() const;
00046   RValue &readVal();
00047   void updateVal( const RValue &newVal );
00048   int getIntValue() const;
00049   LONG getInt64Value() const;
00050   double getDoubleValue() const;
00051   LONG getValue() const;
00052   
00053   RValue &operator=( const RValue &that ) ;
00054   Alias &operator=( const Alias &that ) ;
00055 
00056   bool operator==( const RValue &compareTo ) const;
00057   bool operator!=( const RValue &compareTo ) const;
00058   bool operator>( const RValue &compareTo ) const;
00059   bool operator>=( const RValue &compareTo ) const;
00060   bool operator<( const RValue &compareTo ) const;
00061   bool operator<=( const RValue &compareTo ) const;
00062 
00066   void print( ostream &os ) const;
00070   string toString() const;
00071 
00075   bool isCompositeType() const;
00079   bool isScalarType() const;
00083   bool isPhysicalType() const;
00084 
00089   Value left( const RValue &param = defaultIndex() ) const;
00090   Value right( const RValue &param = defaultIndex() ) const;
00091   Value high( const RValue &param = defaultIndex() ) const;
00092   Value low( const RValue &param = defaultIndex() ) const;
00093   const ScalarTypeInfo &range( const RValue &index = defaultIndex() ) const;
00094   const ScalarTypeInfo &reverse_range( const RValue &index = defaultIndex() ) const;
00095   Value length( const RValue &index = defaultIndex() ) const;
00096   Value ascending( const RValue &index = defaultIndex() ) const;
00097 
00099 
00102   const RValue &operator[]( int index ) const;
00103   RValue &operator[]( int index ) ;
00104   const RValue &operator[]( const RValue &index ) const;
00105   RValue &operator[]( const RValue &index ) ;
00106   Value getSlice( const ScalarTypeInfo &sliceSpecifier ) const;
00108 
00110 
00119   const RValue &getField( int index ) const;
00124   RValue &getField( int index ) ;
00125 
00130   const RValue &getField( const RValue &index ) const;
00131 
00136   RValue &getField( const RValue &index ) ;
00138 
00143   const string &getUnit() const;
00144 
00148   RValue *clone() const;
00149 
00154   LONG getAlias() const;
00159   int getUnits() const;
00160 
00164   const TypeInfo &getTypeInfo() const;
00165 
00166   const EnumerationLiteral &vhdlEqual( const RValue & ) const;
00167   const EnumerationLiteral &vhdlNotEqual( const RValue & ) const;
00168   const EnumerationLiteral &vhdlGreaterThan( const RValue & ) const;
00169   const EnumerationLiteral &vhdlGreaterThanEqual( const RValue & ) const;
00170   const EnumerationLiteral &vhdlLessThan( const RValue & ) const;
00171   const EnumerationLiteral &vhdlLessThanEqual( const RValue & ) const;
00172   Value vhdlConcatenate( const RValue & ) const;
00173 
00174   Value vhdlPlus( const RValue & ) const;
00175   Value vhdlMinus( const RValue & ) const;
00176   Value vhdlMultiply( const RValue & ) const;
00177   Value vhdlDivide( const RValue & ) const;
00178   Value vhdlMod( const RValue & ) const;
00179   Value vhdlRem( const RValue & ) const;
00180   Value vhdlPow( const RValue & ) const;
00181 
00182   RValue &all();
00183   const RValue &all() const;
00184 
00185   SignalNetinfo &addToFanOut( VHDLKernel * );
00186   //DRH
00187   SignalNetinfo &addChild( SignalNetinfo &, VHDLKernel * );
00188 protected:
00189 
00190 private:
00191   RValue &realObject;
00192 };
00193 
00194 #endif
00195 

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