#include <Type.h>
Public Member Functions | |
string | toString () const |
std::ostream & | toStream (std::ostream &str) const |
bool | isBasetype () const |
constTypePtr | matchFlex (constTypePtr type, unsigned int number=0) const |
int | match (constTypePtr expected) const |
TypePtr | clone () const |
constTypePtr | unflex (constTypePtr type, unsigned int number=0) const |
unsigned int | number () const |
NFlexType (unsigned int number, bool as_const=false) | |
NFlexType (bytecodeistream &str) | |
~NFlexType () | |
Private Member Functions | |
REP_BODY (NFlexType) | |
Private Attributes | |
unsigned int | m_number |
NFlexType::NFlexType | ( | unsigned int | number, | |
bool | as_const = false | |||
) |
References ycp2error.
NFlexType::NFlexType | ( | bytecodeistream & | str | ) |
NFlexType::~NFlexType | ( | ) |
TypePtr NFlexType::clone | ( | ) | const [virtual] |
bool NFlexType::isBasetype | ( | ) | const [inline, virtual] |
Reimplemented from Type.
int NFlexType::match | ( | constTypePtr | expected | ) | const [virtual] |
check match with expected type <0: no match, ==0: full match, >0: propagated match
Reimplemented from Type.
References toString(), and y2debug.
constTypePtr NFlexType::matchFlex | ( | constTypePtr | type, | |
unsigned int | number = 0 | |||
) | const [virtual] |
unsigned int NFlexType::number | ( | ) | const |
References m_number.
NFlexType::REP_BODY | ( | NFlexType | ) | [private] |
std::ostream & NFlexType::toStream | ( | std::ostream & | str | ) | const [virtual] |
write bytecode out to stream
write out to bytecode stream
Reimplemented from Type.
References m_number, Bytecode::writeInt32(), and y2debug.
string NFlexType::toString | ( | void | ) | const [virtual] |
Converts a type code to its YCP notation.
Reimplemented from Type.
References m_number, Type::postToString(), and Type::preToString().
Referenced by match(), matchFlex(), and unflex().
constTypePtr NFlexType::unflex | ( | constTypePtr | type, | |
unsigned int | number = 0 | |||
) | const [virtual] |
replace any 'FlexT' (number == 0) or 'NFlexT' (number != 0) with 'type'
Reimplemented from Type.
References clone(), Type::isConst(), Type::isNFlex(), Type::isReference(), m_number, toString(), and y2debug.
unsigned int NFlexType::m_number [private] |
Referenced by clone(), matchFlex(), NFlexType(), number(), toStream(), toString(), and unflex().