ACT Library
|
The abstract base class for all types in the system. More...
#include <basetype.h>
Public Types | |
enum | direction { NONE = 0 , IN = 1 , OUT = 2 , INOUT = 3 , OUTIN = 4 } |
Public Member Functions | |
Type () | |
~Type () | |
constructor | |
virtual const char * | getName ()=0 |
destructor | |
virtual Type * | Expand (ActNamespace *ns, Scope *s, int nt, inst_param *ip)=0 |
virtual int | isEqual (const Type *t) const =0 |
Static Public Member Functions | |
static void | Init () |
static const char * | dirstring (direction d) |
Friends | |
class | TypeFactory |
The abstract base class for all types in the system.
Any type in the system inherits from this base type. It has a number of common methods that all types are expected to provide. Types tend to never be deleted, since they are only created when needed and then persist until the program no longer needs to use the ACT library.
Common types are cached by the TypeFactory, and types should only be created via the TypeFactory class.
enum Type::direction |
A type can have direction flags. The supported direction flags are either none, "?" (for input), and "!" (for output). Additional flags "?!" (inout) and "!?" (outin) can be used in the port list of user-defined data or channel types.
Enumerator | |
---|---|
NONE | no direction flag |
IN | direction flag is ? |
OUT | direction flag is ! |
INOUT | direction flag is ?! |
OUTIN | direction flag is !? |
|
inline |
|
inline |
constructor
|
inlinestatic |
Used for converting a direction into a string for printing.
d | is the direction flag |
|
pure virtual |
This is used to expand the type, substituting any template parameters. These parameters are used for templated built-in types like int<>, chan(), and ptype().
ns | is the namespace |
s | is the evaluation scope |
nt | are the number of template parameters for this type |
ip | is the parameter name |
Implemented in PInt, PInts, PBool, PReal, Bool, UserDef, PType, Int, Chan, Interface, Process, Function, Data, and Channel.
|
pure virtual |
|
static |
Initialize static members. This also calls the static initialization function for the TypeFactory
|
pure virtual |
|
friend |