PhysicalLiteral Class Reference

This class represents a physical literal in tyvis. More...

#include <PhysicalLiteral.hh>

Inheritance diagram for PhysicalLiteral:

Inheritance graph
[legend]
Collaboration diagram for PhysicalLiteral:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PhysicalLiteral ()
 PhysicalLiteral (LONG initValue, const string &unitName)
 PhysicalLiteral (const PhysicalTypeInfo &initTypeInfo, LONG initValue, const string &unitName)
 PhysicalLiteral (const PhysicalTypeInfo &)
 PhysicalLiteral (const PhysicalTypeInfo &, const RValue &initValue)
 PhysicalLiteral (const PhysicalTypeInfo &, LONG initValue)
 PhysicalLiteral (const PhysicalLiteral &that)
virtual ~PhysicalLiteral ()
RValueoperator= (const RValue &)
PhysicalLiteraloperator= (const PhysicalLiteral &)
bool isScalarType () const
 Does this value have a scalar type?
virtual const RValueleftValue ()
const TypeInfogetTypeInfo () const
 Get the TypeInfo for this RValue.
Value vhdlPlus (const RValue &) const
 Arithmetic Operators.
Value vhdlMinus (const RValue &) const
Value vhdlMultiply (const RValue &) const
Value vhdlDivide (const RValue &) const
Value vhdlMod (const RValue &) const
Value vhdlRem (const RValue &) const
Value vhdlPow (const RValue &) const
UniversalInteger vhdlDivide (const PhysicalLiteral &) const
Value vhdlAbs () const
Value vhdlUnaryPlus () const
Value vhdlUnaryMinus () const
RValueclone () const
 Clone this object.
void print (ostream &os) const
 Virtualized printing.
string toString () const
 Get a string representation of the value.
int getIntValue () const
 Returns (int)getInt64Value().
LONG getInt64Value () const
 Returns the value of this literal in terms of the primary unit.
double getDoubleValue () const
 Returns (double)getInt64Value().
LONG getValue () const
 Returns whatever value this literal was created with.
const string & getUnit () const
 Get the unit string for a PhysicalLiteral.
bool operator== (const RValue &) const
bool operator!= (const RValue &) const
bool operator> (const RValue &) const
bool operator>= (const RValue &) const
bool operator< (const RValue &) const
bool operator<= (const RValue &) const
const string & getDataType () const
void serialize (SerializedInstance *) const
VHDLVTime toVTime () const
LONG getValuePrimaryUnit () const
 Calculate and return the value of this literal if it was expressed in primary units.

Static Public Member Functions

static const string & getPhysicalLiteralDataType ()
static void registerDeserializer ()

Public Attributes

const PhysicalTypeInfomyTypeInfo
LONG myValue
string myUnit

Detailed Description

This class represents a physical literal in tyvis.

The representation is a long int (64 bits if possible - determined at configure time) and a string representation of the units.

A literal like "1 ps" is equivalent to "1000 fs". "1 ps" would return "1" for getValue(), "ps" for getUnit(), and "1000" for getInt64Value().


Constructor & Destructor Documentation

PhysicalLiteral::PhysicalLiteral  ) 
 

PhysicalLiteral::PhysicalLiteral LONG  initValue,
const string &  unitName
 

PhysicalLiteral::PhysicalLiteral const PhysicalTypeInfo initTypeInfo,
LONG  initValue,
const string &  unitName
 

PhysicalLiteral::PhysicalLiteral const PhysicalTypeInfo  ) 
 

PhysicalLiteral::PhysicalLiteral const PhysicalTypeInfo ,
const RValue initValue
 

PhysicalLiteral::PhysicalLiteral const PhysicalTypeInfo ,
LONG  initValue
 

PhysicalLiteral::PhysicalLiteral const PhysicalLiteral that  ) 
 

virtual PhysicalLiteral::~PhysicalLiteral  )  [virtual]
 


Member Function Documentation

RValue* PhysicalLiteral::clone  )  const [virtual]
 

Clone this object.

Implements RValue.

const string& PhysicalLiteral::getDataType  )  const
 

double PhysicalLiteral::getDoubleValue  )  const [virtual]
 

Returns (double)getInt64Value().

Implements RValue.

LONG PhysicalLiteral::getInt64Value  )  const [virtual]
 

Returns the value of this literal in terms of the primary unit.

For instance, if getValue() == 1 and getUnits == "ps", then "getInt64Value()" will return "1000".

Implements RValue.

int PhysicalLiteral::getIntValue  )  const [virtual]
 

Returns (int)getInt64Value().

Implements RValue.

static const string& PhysicalLiteral::getPhysicalLiteralDataType  )  [static]
 

const TypeInfo& PhysicalLiteral::getTypeInfo  )  const [virtual]
 

Get the TypeInfo for this RValue.

Implements RValue.

const string& PhysicalLiteral::getUnit  )  const [virtual]
 

Get the unit string for a PhysicalLiteral.

If it's not a PhysicalLiteral, will return "";

Reimplemented from VHDLData.

LONG PhysicalLiteral::getValue  )  const [virtual]
 

Returns whatever value this literal was created with.

For example, if it was created with "1 ps", would return 1.

Reimplemented from VHDLData.

LONG PhysicalLiteral::getValuePrimaryUnit  )  const
 

Calculate and return the value of this literal if it was expressed in primary units.

For example, 1 ps would return 1000 since the primary unit is fs.

bool PhysicalLiteral::isScalarType  )  const [inline, virtual]
 

Does this value have a scalar type?

Implements RValue.

virtual const RValue& PhysicalLiteral::leftValue  )  [virtual]
 

bool PhysicalLiteral::operator!= const RValue  )  const [virtual]
 

Implements VHDLData.

bool PhysicalLiteral::operator< const RValue  )  const [virtual]
 

Implements VHDLData.

bool PhysicalLiteral::operator<= const RValue  )  const [virtual]
 

Implements VHDLData.

PhysicalLiteral& PhysicalLiteral::operator= const PhysicalLiteral  ) 
 

RValue& PhysicalLiteral::operator= const RValue  )  [virtual]
 

Reimplemented from VHDLData.

bool PhysicalLiteral::operator== const RValue  )  const [virtual]
 

Implements VHDLData.

bool PhysicalLiteral::operator> const RValue  )  const [virtual]
 

Implements VHDLData.

bool PhysicalLiteral::operator>= const RValue  )  const [virtual]
 

Implements VHDLData.

void PhysicalLiteral::print ostream &  os  )  const [virtual]
 

Virtualized printing.

Reimplemented from VHDLData.

static void PhysicalLiteral::registerDeserializer  )  [inline, static]
 

void PhysicalLiteral::serialize SerializedInstance *   )  const
 

string PhysicalLiteral::toString  )  const [virtual]
 

Get a string representation of the value.

Reimplemented from VHDLData.

VHDLVTime PhysicalLiteral::toVTime  )  const
 

Value PhysicalLiteral::vhdlAbs  )  const
 

UniversalInteger PhysicalLiteral::vhdlDivide const PhysicalLiteral  )  const
 

Value PhysicalLiteral::vhdlDivide const RValue  )  const [virtual]
 

Implements RValue.

Value PhysicalLiteral::vhdlMinus const RValue  )  const [virtual]
 

Implements RValue.

Value PhysicalLiteral::vhdlMod const RValue  )  const [virtual]
 

Implements RValue.

Value PhysicalLiteral::vhdlMultiply const RValue  )  const [virtual]
 

Implements RValue.

Value PhysicalLiteral::vhdlPlus const RValue  )  const [virtual]
 

Arithmetic Operators.

Implements RValue.

Value PhysicalLiteral::vhdlPow const RValue  )  const [virtual]
 

Implements RValue.

Value PhysicalLiteral::vhdlRem const RValue  )  const [virtual]
 

Implements RValue.

Value PhysicalLiteral::vhdlUnaryMinus  )  const
 

Value PhysicalLiteral::vhdlUnaryPlus  )  const
 


Member Data Documentation

const PhysicalTypeInfo* PhysicalLiteral::myTypeInfo
 

string PhysicalLiteral::myUnit
 

LONG PhysicalLiteral::myValue
 


The documentation for this class was generated from the following file:
Generated on Fri Mar 31 11:12:41 2006 for Tyvis by  doxygen 1.4.6