YCP type Variable <type> for iterator builtins. More...
#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 |
bool | equals (constTypePtr expected) const |
TypePtr | clone () const |
constTypePtr | unflex (constTypePtr type, unsigned int number=0) const |
constTypePtr | type () const |
VariableType (constTypePtr type=Type::Unspec, bool as_const=false) | |
VariableType (bytecodeistream &str) | |
~VariableType () | |
Private Member Functions | |
REP_BODY (VariableType) | |
Private Attributes | |
const constTypePtr | m_type |
YCP type Variable <type> for iterator builtins.
VariableType::VariableType | ( | constTypePtr | type = Type::Unspec , |
|
bool | as_const = false | |||
) |
VariableType::VariableType | ( | bytecodeistream & | str | ) |
VariableType::~VariableType | ( | ) |
TypePtr VariableType::clone | ( | ) | const [virtual] |
bool VariableType::equals | ( | constTypePtr | expected | ) | const [virtual] |
bool VariableType::isBasetype | ( | ) | const [inline, virtual] |
Reimplemented from Type.
int VariableType::match | ( | constTypePtr | expected | ) | const [virtual] |
check match with expected type <0: no match, ==0: full match, >0: propagated match
Reimplemented from Type.
References Type::basematch(), m_type, toString(), and y2debug.
constTypePtr VariableType::matchFlex | ( | constTypePtr | type, | |
unsigned int | number = 0 | |||
) | const [virtual] |
Reimplemented from Type.
References m_type, toString(), and y2debug.
VariableType::REP_BODY | ( | VariableType | ) | [private] |
std::ostream & VariableType::toStream | ( | std::ostream & | str | ) | const [virtual] |
write bytecode out to stream
write out to bytecode stream
Reimplemented from Type.
References m_type, and Bytecode::writeType().
string VariableType::toString | ( | void | ) | const [virtual] |
Converts a type code to its YCP notation.
Reimplemented from Type.
References m_type.
Referenced by match(), matchFlex(), and unflex().
constTypePtr VariableType::type | ( | ) | const [inline] |
References m_type.
constTypePtr VariableType::unflex | ( | constTypePtr | type, | |
unsigned int | number = 0 | |||
) | const [virtual] |
replace any 'FlexT' (number == 0) or 'NFlexT' (number != 0) with 'type'
Reimplemented from Type.
References m_type, toString(), and y2debug.
const constTypePtr VariableType::m_type [private] |
Referenced by clone(), equals(), match(), matchFlex(), toStream(), toString(), type(), and unflex().