YCP type List <type> More...
#include <Type.h>
Public Member Functions | |
string | toString () const |
bool | isBasetype () const |
constTypePtr | matchFlex (constTypePtr type, unsigned int number=0) const |
int | match (constTypePtr expected) const |
bool | equals (constTypePtr expected) const |
constTypePtr | commontype (constTypePtr type) const |
constTypePtr | detailedtype (constTypePtr type) const |
bool | canCast (constTypePtr to) const |
TypePtr | clone () const |
constTypePtr | unflex (constTypePtr type, unsigned int number=0) const |
constTypePtr | type () const |
std::ostream & | toStream (std::ostream &str) const |
ListType (constTypePtr type=Type::Unspec, bool as_const=false) | |
ListType (bytecodeistream &str) | |
~ListType () | |
Private Member Functions | |
REP_BODY (ListType) | |
Private Attributes | |
const constTypePtr | m_type |
YCP type List <type>
ListType::ListType | ( | constTypePtr | type = Type::Unspec , |
|
bool | as_const = false | |||
) |
ListType::ListType | ( | bytecodeistream & | str | ) |
ListType::~ListType | ( | ) |
bool ListType::canCast | ( | constTypePtr | to | ) | const [virtual] |
TypePtr ListType::clone | ( | ) | const [virtual] |
constTypePtr ListType::commontype | ( | constTypePtr | type | ) | const [virtual] |
Finds a type that can hold both given types This should be the narrowest such type - TODO
Reimplemented from Type.
References m_type, toString(), and y2debug.
constTypePtr ListType::detailedtype | ( | constTypePtr | type | ) | const [virtual] |
Finds a type that contains most information This should be the widest such type - TODO
Reimplemented from Type.
References m_type, toString(), and y2debug.
bool ListType::equals | ( | constTypePtr | expected | ) | const [virtual] |
bool ListType::isBasetype | ( | ) | const [inline, virtual] |
Reimplemented from Type.
int ListType::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 ListType::matchFlex | ( | constTypePtr | type, | |
unsigned int | number = 0 | |||
) | const [virtual] |
Reimplemented from Type.
References m_type, toString(), and y2debug.
ListType::REP_BODY | ( | ListType | ) | [private] |
std::ostream & ListType::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 ListType::toString | ( | void | ) | const [virtual] |
Converts a type code to its YCP notation.
Reimplemented from Type.
References m_type, Type::postToString(), and Type::preToString().
Referenced by commontype(), detailedtype(), match(), matchFlex(), and unflex().
constTypePtr ListType::type | ( | ) | const [inline] |
References m_type.
constTypePtr ListType::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 ListType::m_type [private] |
Referenced by canCast(), clone(), commontype(), detailedtype(), equals(), match(), matchFlex(), toStream(), toString(), type(), and unflex().