97 static int nextToken (
const char **signature);
114 static constTypePtr
determineFlexType (constFunctionTypePtr actual, constFunctionTypePtr declared);
120 static const constTypePtr
Any;
122 static const constTypePtr
Void;
128 static const constTypePtr
Path;
131 static const constTypePtr
Term;
149 static const constTypePtr
Flex;
161 static const constTypePtr
List;
163 static const constTypePtr
Map;
167 static FunctionTypePtr
Function(constTypePtr return_type);
169 static const constTypePtr
Nil;
191 virtual std::ostream &
toStream (std::ostream &
str)
const;
196 virtual std::ostream &
toXml (std::ostream &
str,
int indent )
const;
206 virtual constTypePtr
matchFlex (constTypePtr ,
unsigned int = 0)
const {
return 0; }
214 virtual int match (constTypePtr expected)
const;
226 virtual bool canCast (constTypePtr to)
const;
231 virtual TypePtr
clone ()
const;
236 virtual constTypePtr
unflex (constTypePtr type,
unsigned int number = 0)
const;
272 int basematch (constTypePtr expected)
const;
277 virtual bool equals (constTypePtr expected)
const;
318 virtual constTypePtr
commontype (constTypePtr type)
const;
324 virtual constTypePtr
detailedtype (constTypePtr type)
const;
334 std::ostream &
toStream (std::ostream &
str)
const;
336 constTypePtr
matchFlex (constTypePtr type,
unsigned int number = 0)
const;
337 int match (constTypePtr expected)
const;
338 TypePtr
clone ()
const;
339 constTypePtr
unflex (constTypePtr type,
unsigned int number = 0)
const;
354 std::ostream &
toStream (std::ostream &
str)
const;
356 constTypePtr
matchFlex (constTypePtr type,
unsigned int number = 0)
const;
357 int match (constTypePtr expected)
const;
358 TypePtr
clone ()
const;
359 constTypePtr
unflex (constTypePtr type,
unsigned int number = 0)
const;
360 unsigned int number ()
const;
376 std::ostream &
toStream (std::ostream &
str)
const;
378 constTypePtr
matchFlex (constTypePtr
type,
unsigned int number = 0)
const;
379 int match (constTypePtr expected)
const;
380 bool equals (constTypePtr expected)
const;
381 TypePtr
clone ()
const;
382 constTypePtr
unflex (constTypePtr
type,
unsigned int number = 0)
const;
400 constTypePtr
matchFlex (constTypePtr
type,
unsigned int number = 0)
const;
401 int match (constTypePtr expected)
const;
402 bool equals (constTypePtr expected)
const;
405 bool canCast (constTypePtr to)
const;
406 TypePtr
clone ()
const;
407 constTypePtr
unflex (constTypePtr
type,
unsigned int number = 0)
const;
409 std::ostream &
toStream (std::ostream &
str)
const;
427 constTypePtr
matchFlex (constTypePtr type,
unsigned int number = 0)
const;
428 int match (constTypePtr expected)
const;
429 bool equals (constTypePtr expected)
const;
430 constTypePtr
commontype (constTypePtr type)
const;
432 bool canCast (constTypePtr to)
const;
433 TypePtr
clone ()
const;
434 constTypePtr
unflex (constTypePtr type,
unsigned int number = 0)
const;
437 std::ostream &
toStream (std::ostream &
str)
const;
453 constTypePtr
matchFlex (constTypePtr type,
unsigned int number = 0)
const;
454 int match (constTypePtr expected)
const;
455 bool equals (constTypePtr expected)
const;
456 bool canCast (constTypePtr to)
const;
457 TypePtr
clone ()
const;
458 constTypePtr
unflex (constTypePtr type,
unsigned int number = 0)
const;
460 std::ostream &
toStream (std::ostream &
str)
const;
461 BlockType (constTypePtr type,
bool as_const =
false);
477 constTypePtr
matchFlex (constTypePtr type,
unsigned int number = 0)
const;
478 int match (constTypePtr expected)
const;
479 bool equals (constTypePtr expected)
const;
480 bool canCast (constTypePtr to)
const;
481 TypePtr
clone ()
const;
482 constTypePtr
unflex (constTypePtr type,
unsigned int number = 0)
const;
483 std::ostream &
toStream (std::ostream &
str)
const;
484 TupleType (constTypePtr type,
bool as_const =
false);
486 void concat (constTypePtr t);
488 constTypePtr
parameterType (
unsigned int parameter_number)
const;
502 FunctionType (constTypePtr return_type, constFunctionTypePtr arguments);
505 constTypePtr
matchFlex (constTypePtr type,
unsigned int number = 0)
const;
506 int match (constTypePtr expected)
const;
507 bool equals (constTypePtr expected)
const;
508 bool canCast (constTypePtr )
const {
return false; }
509 TypePtr
clone ()
const;
510 constTypePtr
unflex (constTypePtr type,
unsigned int number = 0)
const;
511 std::ostream &
toStream (std::ostream &
str)
const;
516 void concat (constTypePtr t);
518 constTypePtr
parameterType (
unsigned int parameter_number)
const;
bool isBasetype() const
Definition: Type.h:426
static const constTypePtr Wildcard
Definition: Type.h:132
int match(constTypePtr expected) const
Definition: Type.cc:1076
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:812
TupleType(constTypePtr type, bool as_const=false)
Definition: Type.cc:1330
int match(constTypePtr expected) const
Definition: Type.cc:885
bool isBasetype() const
Definition: Type.h:377
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:1238
const constTypePtr m_type
Definition: Type.h:373
constTypePtr detailedtype(constTypePtr type) const
Definition: Type.cc:956
static const constTypePtr ConstLocale
Definition: Type.h:140
bool isBasetype() const
Definition: Type.h:355
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:698
bool isFlex() const
Definition: Type.h:297
static const constTypePtr Term
Definition: Type.h:131
bool m_const
Definition: Type.h:75
bool isWildcard() const
Definition: Type.h:296
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:1360
static constTypePtr vt2type(enum YCPValueType vt)
Definition: TypeStatics.cc:30
std::vector< constTypePtr > m_types
Definition: Type.h:473
static const constTypePtr MapUnspec
Definition: Type.h:162
static const constTypePtr NFlex1
Definition: Type.h:151
bool isPath() const
Definition: Type.h:291
bool isTerm() const
Definition: Type.h:294
bool isSymbol() const
Definition: Type.h:293
#define str
Definition: scanner.cc:997
static const constTypePtr Nil
Definition: Type.h:169
int match(constTypePtr expected) const
Definition: Type.cc:673
string toString() const
Definition: Type.cc:1661
static const constTypePtr Map
Definition: Type.h:163
virtual std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:145
constTypePtr type() const
Definition: Type.h:408
static const constTypePtr ConstTerm
Definition: Type.h:144
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:845
constTypePtr commontype(constTypePtr type) const
Definition: Type.cc:930
string toString() const
Definition: Type.cc:644
static const constTypePtr Locale
Definition: Type.h:127
bool equals(constTypePtr expected) const
Definition: Type.cc:910
Type(tkind kind, bool as_const=false, bool as_reference=false)
Definition: Type.h:78
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:992
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:1025
bool isReference() const
Definition: Type.h:261
void asReference()
Definition: Type.h:266
static const constTypePtr ConstVoid
Definition: Type.h:135
static const constTypePtr Symbol
Definition: Type.h:130
int match(constTypePtr expected) const
Definition: Type.cc:1270
virtual constTypePtr detailedtype(constTypePtr type) const
Definition: Type.cc:1923
tkind m_kind
Definition: Type.h:74
static void setNocheck(bool nocheck)
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:549
const constTypePtr m_valuetype
Definition: Type.h:423
void concat(constTypePtr t)
Definition: Type.cc:1617
unsigned int number() const
Definition: Type.cc:691
bool equals(constTypePtr expected) const
Definition: Type.cc:1771
TypePtr clone() const
Definition: Type.cc:577
TypePtr clone() const
Definition: Type.cc:804
static const constTypePtr ConstInteger
Definition: Type.h:139
bool isMap() const
Definition: Type.h:302
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1828
const constTypePtr m_returntype
Definition: Type.h:499
bool isBasetype() const
Definition: Type.h:504
static const constTypePtr ConstNFlex1
Definition: Type.h:152
static const constTypePtr ConstFlex
Definition: Type.h:150
bool isList() const
Definition: Type.h:301
int match(constTypePtr expected) const
Definition: Type.cc:771
static constTypePtr determineFlexType(constFunctionTypePtr actual, constFunctionTypePtr declared)
Definition: TypeStatics.cc:525
virtual string toXmlString() const
Definition: Type.cc:208
YCP type Block <type>
Definition: Type.h:445
TypePtr clone() const
Definition: Type.cc:1185
BlockType(constTypePtr type, bool as_const=false)
Definition: Type.cc:1218
const constTypePtr m_type
Definition: Type.h:396
bool isVariable() const
Definition: Type.h:300
static const constTypePtr Flex
Definition: Type.h:149
Tuple <type, type, ...> (function arguments)
Definition: Type.h:469
bool isBoolean() const
Definition: Type.h:286
YCPValueType
Value Type Defines constants for the Value types. The Value type specifies the class the YCPValueRep ...
Definition: YCPValue.h:36
~VariableType()
Definition: Type.cc:735
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:654
static const constTypePtr ConstNFlex2
Definition: Type.h:154
const constTypePtr m_keytype
Definition: Type.h:422
~BlockType()
Definition: Type.cc:1232
enum Type::type_kind tkind
const constTypePtr m_type
Definition: Type.h:449
static int nextToken(const char **signature)
Definition: TypeStatics.cc:69
static const constTypePtr ConstNFlex3
Definition: Type.h:156
YCP type <flexN>
Definition: Type.h:348
Type()
Definition: Type.cc:111
TypePtr clone() const
Definition: Type.cc:1310
tkind kind() const
Definition: Type.h:175
static const constTypePtr Error
Definition: Type.h:119
static const constTypePtr Block
Definition: Type.h:165
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:632
constTypePtr parameterType(unsigned int parameter_number) const
Definition: Type.cc:1643
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1256
bool canCast(constTypePtr to) const
Definition: Type.cc:1303
static const constTypePtr Unspec
Definition: Type.h:118
bool isVoid() const
Definition: Type.h:295
TypePtr clone() const
Definition: Type.cc:1529
bool isError() const
Definition: Type.h:284
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1684
ListType(constTypePtr type=Type::Unspec, bool as_const=false)
Definition: Type.cc:825
static const constTypePtr Float
Definition: Type.h:125
static const constTypePtr Any
Definition: Type.h:120
static const constTypePtr NFlex3
Definition: Type.h:155
static const constTypePtr ConstPath
Definition: Type.h:141
bool canCast(constTypePtr to) const
Definition: Type.cc:1503
constTypePtr valuetype() const
Definition: Type.h:436
constTypePtr returnType() const
Definition: Type.h:459
~MapType()
Definition: Type.cc:1019
virtual TypePtr clone() const
Definition: Type.cc:497
string toString() const
Definition: Type.cc:750
bool isBasetype() const
Definition: Type.h:399
bool isByteblock() const
Definition: Type.h:287
string toString() const
Definition: Type.cc:1392
bool isNil() const
Definition: Type.h:307
static const constTypePtr ConstSymbol
Definition: Type.h:143
FlexType(bool as_const=false)
Definition: Type.cc:513
~TupleType()
Definition: Type.cc:1354
TypePtr clone() const
Definition: Type.cc:984
bool canCast(constTypePtr to) const
Definition: Type.cc:977
string toString() const
Definition: Type.cc:854
int basematch(constTypePtr expected) const
Definition: Type.cc:221
constTupleTypePtr parameters() const
Definition: Type.cc:1654
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:585
unsigned int parameterCount() const
Definition: Type.h:487
YCP type List <type>
Definition: Type.h:392
bool isLocale() const
Definition: Type.h:290
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1057
static const constTypePtr ConstNFlex4
Definition: Type.h:158
FunctionType(constTypePtr return_type, constFunctionTypePtr arguments)
Definition: Type.cc:1563
bool isUnspec() const
Definition: Type.h:283
TypePtr clone() const
Definition: Type.cc:683
string toString() const
Definition: Type.cc:542
void concat(constTypePtr t)
Definition: Type.cc:1373
bool isAny() const
Definition: Type.h:285
bool isTuple() const
Definition: Type.h:304
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1408
static const constTypePtr Path
Definition: Type.h:128
int parameterCount() const
Definition: Type.cc:1632
static const constTypePtr String
Definition: Type.h:129
bool isBasetype() const
Definition: Type.h:476
static const constTypePtr Byteblock
Definition: Type.h:124
virtual bool isBasetype() const
Definition: Type.h:201
~FunctionType()
Definition: Type.cc:1611
bool equals(constTypePtr expected) const
Definition: Type.cc:1105
TypePtr clone() const
Definition: Type.cc:1813
TupleTypePtr m_arguments
Definition: Type.h:500
void asConst()
Definition: Type.h:256
static const constTypePtr NFlex2
Definition: Type.h:153
bool equals(constTypePtr expected) const
Definition: Type.cc:1288
static const constTypePtr ListUnspec
Definition: Type.h:160
bool equals(constTypePtr expected) const
Definition: Type.cc:789
bool isFunction() const
Definition: Type.h:305
constTypePtr returnType() const
Definition: Type.h:515
bool isBlock() const
Definition: Type.h:303
static const constTypePtr NFlex4
Definition: Type.h:157
~FlexType()
Definition: Type.cc:528
YCP type Variable <type> for iterator builtins.
Definition: Type.h:369
static constTypePtr fromSignature(const string &signature)
Definition: Type.h:108
VariableType(constTypePtr type=Type::Unspec, bool as_const=false)
Definition: Type.cc:721
virtual int matchvalue(YCPValue value) const
Definition: Type.cc:334
virtual constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:505
string toString() const
Definition: Type.cc:1035
int match(constTypePtr expected) const
Definition: Type.cc:1437
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:757
static const constTypePtr ConstString
Definition: Type.h:142
static const constTypePtr ConstFloat
Definition: Type.h:138
bool canCast(constTypePtr) const
Definition: Type.h:508
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:534
MapType(constTypePtr key=Type::Unspec, constTypePtr value=Type::Unspec, bool as_const=false)
Definition: Type.cc:1003
int match(constTypePtr expected) const
Definition: Type.cc:1707
bool isInteger() const
Definition: Type.h:289
YCP type Map <keytype, valuetype>
Definition: Type.h:418
virtual bool canCast(constTypePtr to) const
Definition: Type.cc:472
bool isNFlex() const
Definition: Type.h:298
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:741
type_kind
Definition: Type.h:45
bool canCast(constTypePtr to) const
Definition: Type.cc:1172
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1318
virtual std::ostream & toXml(std::ostream &str, int indent) const
Definition: Type.cc:158
YCP type Function <returntype, arg1type, arg2type, ...>
Definition: Type.h:495
bool isBasetype() const
Definition: Type.h:335
static const constTypePtr ConstBoolean
Definition: Type.h:136
constTypePtr type() const
Definition: Type.h:383
YCP type.
Definition: Type.h:36
constTypePtr commontype(constTypePtr type) const
Definition: Type.cc:1126
constTypePtr detailedtype(constTypePtr type) const
Definition: Type.cc:1151
string toString() const
Definition: Type.cc:1247
static const constTypePtr Variable
Definition: Type.h:164
Wrapper for YCPValueRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPValueRep with the arrow operator. See YCPValueRep.
Definition: YCPValue.h:275
constTypePtr parameterType(unsigned int parameter_number) const
Definition: Type.cc:1381
virtual constTypePtr commontype(constTypePtr type) const
Definition: Type.cc:1888
static const constTypePtr Integer
Definition: Type.h:126
unsigned int m_number
Definition: Type.h:351
YCPValueType valueType() const
Definition: Type.cc:1847
virtual string toString() const
Definition: Type.cc:170
bool equals(constTypePtr expected) const
Definition: Type.cc:1474
Base class for reference counted objects.
Definition: Rep.h:46
static const constTypePtr List
Definition: Type.h:161
YCP type <flex>
Definition: Type.h:329
static FunctionTypePtr Function(constTypePtr return_type)
Definition: Type.cc:103
static const constTypePtr ConstAny
Definition: Type.h:134
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1193
static const constTypePtr ConstMap
Definition: Type.h:147
NFlexType(unsigned int number, bool as_const=false)
Definition: Type.cc:608
static const constTypePtr Boolean
Definition: Type.h:123
int match(constTypePtr expected) const
Definition: Type.cc:567
constTypePtr unflex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:1541
An istream that remembers some data about the xmlcode.
Definition: Xmlcode.h:42
An istream that remembers some data about the bytecode.
Definition: Bytecode.h:42
bool m_reference
Definition: Type.h:76
static const constTypePtr Void
Definition: Type.h:122
bool isFloat() const
Definition: Type.h:288
string postToString() const
Definition: Type.h:246
constTypePtr matchFlex(constTypePtr type, unsigned int number=0) const
Definition: Type.cc:871
bool isConst() const
Definition: Type.h:251
~NFlexType()
Definition: Type.cc:626
virtual ~Type()
Definition: Type.cc:122
virtual constTypePtr matchFlex(constTypePtr, unsigned int=0) const
Definition: Type.h:206
constTypePtr keytype() const
Definition: Type.h:435
string preToString() const
Definition: Type.h:241
bool isBasetype() const
Definition: Type.h:452
~ListType()
Definition: Type.cc:839
virtual int match(constTypePtr expected) const
Definition: Type.cc:275
static const constTypePtr ConstByteblock
Definition: Type.h:137
static constTypePtr fromSignature(const char **signature)
Definition: TypeStatics.cc:281
Definition: MemUsage.h:37
virtual bool equals(constTypePtr expected) const
Definition: Type.cc:486
static const constTypePtr ConstList
Definition: Type.h:146
bool isString() const
Definition: Type.h:292
std::ostream & toStream(std::ostream &str) const
Definition: Type.cc:1591