|
Public Types |
typedef enum Type::type_kind | tkind |
enum | type_kind {
UnspecT = 0,
ErrorT,
AnyT,
BooleanT,
ByteblockT,
FloatT,
IntegerT,
LocaleT,
PathT,
StringT,
SymbolT,
TermT,
VoidT,
WildcardT,
FlexT,
VariableT,
ListT,
MapT,
BlockT,
TupleT,
FunctionT,
NilT,
NFlexT
} |
Public Member Functions |
| Type () |
| Type (tkind kind, std::istream &str) |
virtual | ~Type () |
virtual string | toString () const |
virtual std::ostream & | toStream (std::ostream &str) const |
virtual bool | isBasetype () const |
virtual constTypePtr | matchFlex (constTypePtr type, unsigned int number=0) const |
virtual int | match (constTypePtr expected) const |
virtual bool | canCast (constTypePtr to) const |
virtual TypePtr | clone () const |
virtual constTypePtr | unflex (constTypePtr type, unsigned int number=0) const |
string | preToString () const |
string | postToString () const |
bool | isConst () const |
void | asConst () |
bool | isReference () const |
void | asReference () |
int | basematch (constTypePtr expected) const |
virtual bool | equals (constTypePtr expected) const |
bool | isUnspec () const |
bool | isError () const |
bool | isAny () const |
bool | isBoolean () const |
bool | isByteblock () const |
bool | isFloat () const |
bool | isInteger () const |
bool | isLocale () const |
bool | isPath () const |
bool | isString () const |
bool | isSymbol () const |
bool | isTerm () const |
bool | isVoid () const |
bool | isWildcard () const |
bool | isFlex () const |
bool | isNFlex () const |
bool | isVariable () const |
bool | isList () const |
bool | isMap () const |
bool | isBlock () const |
bool | isTuple () const |
bool | isFunction () const |
bool | isNil () const |
YCPValueType | valueType () const |
virtual constTypePtr | commontype (constTypePtr type) const |
Static Public Member Functions |
void | setNocheck (bool nocheck) |
constTypePtr | vt2type (enum YCPValueType vt) |
int | nextToken (const char **signature) |
constTypePtr | fromSignature (const char **signature) |
constTypePtr | fromSignature (const string &signature) |
constTypePtr | determineFlexType (constFunctionTypePtr actual, constFunctionTypePtr declared) |
FunctionTypePtr | Function (constTypePtr return_type) |
Static Public Attributes |
const constTypePtr | Unspec = TypePtr ( new Type (UnspecT)) |
const constTypePtr | Error = TypePtr ( new Type (ErrorT)) |
const constTypePtr | Any = TypePtr ( new Type (AnyT)) |
const constTypePtr | Void = TypePtr ( new Type (VoidT)) |
const constTypePtr | Boolean = TypePtr ( new Type (BooleanT)) |
const constTypePtr | Byteblock = TypePtr ( new Type (ByteblockT)) |
const constTypePtr | Float = TypePtr ( new Type (FloatT)) |
const constTypePtr | Integer = TypePtr ( new Type (IntegerT)) |
const constTypePtr | Locale = TypePtr ( new Type (LocaleT)) |
const constTypePtr | Path = TypePtr ( new Type (PathT)) |
const constTypePtr | String = TypePtr ( new Type (StringT)) |
const constTypePtr | Symbol = TypePtr ( new Type (SymbolT)) |
const constTypePtr | Term = TypePtr ( new Type (TermT)) |
const constTypePtr | Wildcard = TypePtr ( new Type (WildcardT)) |
const constTypePtr | ConstAny = TypePtr ( new Type (AnyT, true)) |
const constTypePtr | ConstVoid = TypePtr ( new Type (VoidT, true)) |
const constTypePtr | ConstBoolean = TypePtr ( new Type (BooleanT, true)) |
const constTypePtr | ConstByteblock = TypePtr ( new Type (ByteblockT, true)) |
const constTypePtr | ConstFloat = TypePtr ( new Type (FloatT, true)) |
const constTypePtr | ConstInteger = TypePtr ( new Type (IntegerT, true)) |
const constTypePtr | ConstLocale = TypePtr ( new Type (LocaleT, true)) |
const constTypePtr | ConstPath = TypePtr ( new Type (PathT, true)) |
const constTypePtr | ConstString = TypePtr ( new Type (StringT, true)) |
const constTypePtr | ConstSymbol = TypePtr ( new Type (SymbolT, true)) |
const constTypePtr | ConstTerm = TypePtr ( new Type (TermT, true)) |
const constTypePtr | ConstList = TypePtr ( new Type (ListT, true)) |
const constTypePtr | ConstMap = TypePtr ( new Type (MapT, true)) |
const constTypePtr | Flex = TypePtr ( new FlexType()) |
const constTypePtr | ConstFlex = TypePtr ( new FlexType (true)) |
const constTypePtr | NFlex1 = TypePtr ( new NFlexType(1)) |
const constTypePtr | ConstNFlex1 = TypePtr ( new NFlexType (1, true)) |
const constTypePtr | NFlex2 = TypePtr ( new NFlexType(2)) |
const constTypePtr | ConstNFlex2 = TypePtr ( new NFlexType (2, true)) |
const constTypePtr | NFlex3 = TypePtr ( new NFlexType(3)) |
const constTypePtr | ConstNFlex3 = TypePtr ( new NFlexType (3, true)) |
const constTypePtr | NFlex4 = TypePtr ( new NFlexType(4)) |
const constTypePtr | ConstNFlex4 = TypePtr ( new NFlexType (4, true)) |
const constTypePtr | ListUnspec = new ListType (Type::Unspec) |
const constTypePtr | List = new ListType (Type::Any) |
const constTypePtr | MapUnspec = new MapType (Type::Unspec, Type::Unspec) |
const constTypePtr | Map = new MapType (Type::Any, Type::Any) |
const constTypePtr | Variable = new VariableType (Type::Any) |
const constTypePtr | Block = new BlockType (Type::Any) |
const constTypePtr | Nil = TypePtr ( new Type (NilT)) |
Protected Member Functions |
| Type (tkind kind, bool as_const=false, bool as_reference=false) |
Protected Attributes |
tkind | m_kind |
bool | m_const |
bool | m_reference |
Private Member Functions |
| REP_BODY (Type) |
tkind | kind () const |