yast2-core
|
#include <YSymbolEntry.h>
Classes | |
union | payload |
Public Member Functions | |
YSymbolEntry (const Y2Namespace *name_space, unsigned int position, const char *name, category_t cat, constTypePtr type, YCodePtr payload=0) | |
YSymbolEntry (const char *name, constTypePtr type, declaration_t *payload, const Y2Namespace *name_space=0) | |
YSymbolEntry (const char *name, constTypePtr type, SymbolTable *payload) | |
YSymbolEntry (const char *filename) | |
YSymbolEntry (bytecodeistream &str, const Y2Namespace *name_space=0) | |
void | setCode (YCodePtr code) |
YCodePtr | code () const |
virtual bool | onlyDeclared () const |
void | setDeclaration (declaration_t *decl) |
declaration_t * | declaration () const |
void | setTable (SymbolTable *table) |
SymbolTable * | table () const |
Y2Namespace * | payloadNamespace () const |
void | setPayloadNamespace (Y2Namespace *name_space) |
virtual string | toString (bool with_type=true) const |
std::ostream & | toStream (std::ostream &str) const |
std::ostream & | toXml (std::ostream &str, int indent) const |
![]() | |
SymbolEntry (const Y2Namespace *name_space, unsigned int position, const char *name, category_t cat, constTypePtr type) | |
virtual | ~SymbolEntry () |
const Y2Namespace * | nameSpace () const |
void | setNamespace (const Y2Namespace *name_space) |
unsigned int | position () const |
void | setPosition (unsigned int position) |
bool | isGlobal () const |
void | setGlobal (bool global) |
bool | isModule () const |
bool | isVariable () const |
bool | isReference () const |
bool | isFunction () const |
bool | isBuiltin () const |
bool | isNamespace () const |
bool | isSelf () const |
bool | isFilename () const |
bool | isPredefined () const |
bool | likeNamespace () const |
const char * | name () const |
category_t | category () const |
void | setCategory (category_t cat) |
constTypePtr | type () const |
string | catString () const |
void | setType (constTypePtr type) |
virtual YCPValue | setValue (YCPValue value) |
virtual YCPValue | value () const |
void | push () |
void | pop () |
![]() | |
Rep () | |
Rep (const Rep &) | |
Rep & | operator= (const Rep &) |
virtual | ~Rep () |
void | ref () const |
void | unref () const |
unsigned | refCount () const |
virtual const char * | repName () const |
virtual std::ostream & | dumpOn (std::ostream &str) const |
Private Member Functions | |
REP_BODY (YSymbolEntry) | |
Private Attributes | |
union YSymbolEntry::payload | m_payload |
YCodePtr | m_code |
Additional Inherited Members | |
![]() | |
enum | category_t { c_unspec = 0, c_global, c_module, c_variable, c_reference, c_function, c_builtin, c_typedef, c_const, c_namespace, c_self, c_predefined, c_filename } |
![]() | |
static void | ref (const Rep *obj_r) |
static void | unref (const Rep *obj_r) |
![]() | |
static UstringHash * | _nameHash = NULL |
static Ustring | emptyUstring = Ustring ( *( SymbolEntry::_nameHash ? SymbolEntry::_nameHash : (SymbolEntry::_nameHash = new UstringHash)), "") |
![]() | |
typedef std::stack< YCPValue > | valuestack_t |
![]() | |
virtual void | ref_to (unsigned) const |
virtual void | unref_to (unsigned) const |
![]() | |
bool | m_global |
const Y2Namespace * | m_namespace |
unsigned int | m_position |
Ustring | m_name |
category_t | m_category |
constTypePtr | m_type |
YCPValue | m_value |
valuestack_t * | m_recurse_stack |
YSymbolEntry::YSymbolEntry | ( | const Y2Namespace * | name_space, |
unsigned int | position, | ||
const char * | name, | ||
category_t | cat, | ||
constTypePtr | type, | ||
YCodePtr | payload = 0 |
||
) |
YSymbolEntry::YSymbolEntry | ( | const char * | name, |
constTypePtr | type, | ||
declaration_t * | payload, | ||
const Y2Namespace * | name_space = 0 |
||
) |
References YSymbolEntry::payload::m_decl, SymbolEntry::m_global, m_payload, and SymbolEntry::m_value.
YSymbolEntry::YSymbolEntry | ( | const char * | name, |
constTypePtr | type, | ||
SymbolTable * | payload | ||
) |
References SymbolEntry::m_global, m_payload, YSymbolEntry::payload::m_table, SymbolEntry::m_value, and table().
YSymbolEntry::YSymbolEntry | ( | const char * | filename | ) |
References SymbolEntry::m_global, and SymbolEntry::m_value.
YSymbolEntry::YSymbolEntry | ( | bytecodeistream & | str, |
const Y2Namespace * | name_space = 0 |
||
) |
References SymbolEntry::_nameHash, Ustring::asString(), SymbolEntry::c_builtin, SymbolEntry::c_variable, StaticDeclaration::findDeclaration(), SymbolEntry::m_category, m_code, YSymbolEntry::payload::m_decl, SymbolEntry::m_global, SymbolEntry::m_name, SymbolEntry::m_namespace, m_payload, SymbolEntry::m_position, SymbolEntry::m_type, SymbolEntry::m_value, Bytecode::readBool(), Bytecode::readCharp(), Bytecode::readCode(), Bytecode::readInt32(), Bytecode::readType(), static_declarations, toString(), y2debug, and y2error.
YCodePtr YSymbolEntry::code | ( | ) | const |
References SymbolEntry::c_builtin, SymbolEntry::c_module, SymbolEntry::m_category, and m_code.
Referenced by setCode().
declaration_t * YSymbolEntry::declaration | ( | ) | const |
References SymbolEntry::c_builtin, SymbolEntry::m_category, YSymbolEntry::payload::m_decl, and m_payload.
|
virtual |
Reimplemented from SymbolEntry.
References SymbolEntry::c_function, SymbolEntry::m_category, and m_code.
Y2Namespace * YSymbolEntry::payloadNamespace | ( | ) | const |
References SymbolEntry::c_module, SymbolEntry::m_category, YSymbolEntry::payload::m_namespace, and m_payload.
|
private |
void YSymbolEntry::setCode | ( | YCodePtr | code | ) |
References SymbolEntry::c_builtin, SymbolEntry::c_module, code(), SymbolEntry::m_category, m_code, toString(), and y2error.
void YSymbolEntry::setDeclaration | ( | declaration_t * | decl | ) |
References SymbolEntry::c_builtin, SymbolEntry::m_category, YSymbolEntry::payload::m_decl, m_payload, toString(), and y2error.
void YSymbolEntry::setPayloadNamespace | ( | Y2Namespace * | name_space | ) |
References SymbolEntry::c_module, SymbolEntry::m_category, YSymbolEntry::payload::m_namespace, m_payload, toString(), and y2error.
void YSymbolEntry::setTable | ( | SymbolTable * | table | ) |
References SymbolEntry::c_namespace, SymbolEntry::m_category, m_payload, YSymbolEntry::payload::m_table, table(), toString(), and y2error.
SymbolTable * YSymbolEntry::table | ( | ) | const |
References SymbolEntry::c_namespace, SymbolEntry::m_category, m_payload, and YSymbolEntry::payload::m_table.
Referenced by setTable(), and YSymbolEntry().
std::ostream & YSymbolEntry::toStream | ( | std::ostream & | str | ) | const |
|
virtual |
Reimplemented from SymbolEntry.
References Ustring::asString(), SymbolEntry::c_builtin, SymbolEntry::c_const, SymbolEntry::c_filename, SymbolEntry::c_function, SymbolEntry::c_namespace, SymbolEntry::c_predefined, SymbolEntry::c_reference, SymbolEntry::c_self, SymbolEntry::c_typedef, SymbolEntry::c_variable, SymbolEntry::catString(), SymbolEntry::m_category, m_code, YSymbolEntry::payload::m_decl, SymbolEntry::m_global, SymbolEntry::m_name, SymbolEntry::m_namespace, m_payload, SymbolEntry::m_type, Y2Namespace::name(), SymbolEntry::toString(), declaration::type, and y2debug.
Referenced by setCode(), setDeclaration(), setPayloadNamespace(), setTable(), toStream(), and YSymbolEntry().
std::ostream & YSymbolEntry::toXml | ( | std::ostream & | str, |
int | indent | ||
) | const |
|
private |
Referenced by code(), onlyDeclared(), setCode(), toString(), and YSymbolEntry().
|
private |
Referenced by declaration(), payloadNamespace(), setDeclaration(), setPayloadNamespace(), setTable(), table(), toStream(), toString(), and YSymbolEntry().