#include <YCPTerm.h>
Inheritance diagram for YCPTermRep:

Public Member Functions | |
| string | name () const |
| YCPList | args () const |
| YCPOrder | compare (const YCPTerm &v) const |
| virtual const YCPElementRep * | shallowCopy () const |
| YCPTerm | functionalAdd (const YCPValue &value) const |
| string | toString () const |
| std::ostream & | toStream (std::ostream &str) const |
| bool | isEmpty () const |
| int | size () const |
| void | reserve (int size) |
| YCPValue | value (int n) const |
| void | set (const int n, const YCPValue &value) |
| void | add (const YCPValue &value) |
| YCPValueType | valuetype () const |
Protected Member Functions | |
| YCPTermRep (const string &s) | |
| YCPTermRep (const string &s, const YCPList &l) | |
| ~YCPTermRep () | |
Private Member Functions | |
| void | setName (string name) |
Private Attributes | |
| Ustring | s |
| YCPList | l |
Friends | |
| class | YCPTerm |
| YCPTermRep::YCPTermRep | ( | const string & | s | ) | [protected] |
Creates a new and empty term with the string s.
| YCPTermRep::YCPTermRep | ( | const string & | s, | |
| const YCPList & | l | |||
| ) | [protected] |
Creates a new term with the string s and argument list l.
| YCPTermRep::~YCPTermRep | ( | ) | [inline, protected] |
Cleans up
| void YCPTermRep::setName | ( | string | name | ) | [private] |
Set the new term name
| string YCPTermRep::name | ( | ) | const |
Returns the term's name
| YCPList YCPTermRep::args | ( | ) | const |
Returns the term's arguments list
Compares two YCPTerms for equality, greaterness or smallerness. The relation is lexicographically with respect to 1. the name of the term 2. the list of the term if the names are the same.
(( `alpha() == `alpha() ) == true ) (( `alpha() < `alpha( 1 ) ) == true ) (( `alpha( 1 ) == `alpha( 1 ) ) == true ) (( `alpha( 1 ) < `beta( 1 ) ) == true ) (( `alpha( 1 ) < `alpha( 2 ) ) == true ) (( `alpha( 1 ) < { term b = `beta( 1 ); return b; } ) == true ) term/term (( `alpha( 1 ) > { term b = `beta( 1 ); } ) == true ) term/nil
| v | value to compare against |
| const YCPElementRep * YCPTermRep::shallowCopy | ( | ) | const [virtual] |
Creates a copy of this term, i.e. creates a new term with the same elements and the same name as this one. The elements themselves are not copied, but only cloned!
Reimplemented from YCPElementRep.
Creates a new term, that is identical to this one with but one new value appended. Doesn't change this term.
| string YCPTermRep::toString | ( | ) | const [virtual] |
Returns an ASCII representation of the term. Term are denoted by comma separated values enclosed by brackets precedeed by a name, for example `a(1,2) or `b() or `Hugo_17("hirn", c(true)).
Implements YCPElementRep.
| std::ostream & YCPTermRep::toStream | ( | std::ostream & | str | ) | const [virtual] |
Output value as bytecode to stream
Implements YCPElementRep.
| bool YCPTermRep::isEmpty | ( | ) | const |
Mapping for the term's list isEmpty() function
| int YCPTermRep::size | ( | ) | const |
Mapping for the term's list size() function
| void YCPTermRep::reserve | ( | int | size | ) |
Mapping for the term's list reserve (int) function
| void YCPTermRep::set | ( | const int | n, | |
| const YCPValue & | value | |||
| ) |
Mapping for the term's list set() function
| YCPValueType YCPTermRep::valuetype | ( | ) | const [virtual] |
Returns YT_TERM. See YCPValueRep::valuetype.
Implements YCPValueRep.
friend class YCPTerm [friend] |
Ustring YCPTermRep::s [private] |
The terms name
YCPList YCPTermRep::l [private] |
YCP list representing the term's arguments
1.5.0