yast2-core
|
#include <SymbolEntry.h>
Public Types | |
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 } |
Public Member Functions | |
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) |
virtual bool | onlyDeclared () const |
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 () |
virtual string | toString (bool with_type=true) const |
![]() | |
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 |
Static Public Attributes | |
static UstringHash * | _nameHash = NULL |
static Ustring | emptyUstring = Ustring ( *( SymbolEntry::_nameHash ? SymbolEntry::_nameHash : (SymbolEntry::_nameHash = new UstringHash)), "") |
Protected Types | |
typedef std::stack< YCPValue > | valuestack_t |
Protected Attributes | |
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 |
Private Member Functions | |
REP_BODY (SymbolEntry) | |
Additional Inherited Members | |
![]() | |
static void | ref (const Rep *obj_r) |
static void | unref (const Rep *obj_r) |
![]() | |
virtual void | ref_to (unsigned) const |
virtual void | unref_to (unsigned) const |
|
protected |
SymbolEntry::SymbolEntry | ( | const Y2Namespace * | name_space, |
unsigned int | position, | ||
const char * | name, | ||
category_t | cat, | ||
constTypePtr | type | ||
) |
constructor
|
virtual |
SymbolEntry::category_t SymbolEntry::category | ( | ) | const |
References m_category.
string SymbolEntry::catString | ( | ) | const |
References c_builtin, c_const, c_filename, c_function, c_module, c_namespace, c_predefined, c_reference, c_self, c_typedef, c_unspec, c_variable, and m_category.
Referenced by YSymbolEntry::toString(), toString(), and YSymbolEntry::toXml().
|
inline |
References c_builtin.
|
inline |
References c_filename.
|
inline |
References c_function.
bool SymbolEntry::isGlobal | ( | ) | const |
References m_global.
|
inline |
References c_module.
Referenced by likeNamespace().
|
inline |
References c_namespace.
Referenced by likeNamespace().
|
inline |
References c_predefined.
|
inline |
References c_reference.
|
inline |
References c_self.
Referenced by likeNamespace().
|
inline |
References c_variable.
|
inline |
References isModule(), isNamespace(), and isSelf().
const char * SymbolEntry::name | ( | ) | const |
References Ustring::asString(), and m_name.
const Y2Namespace * SymbolEntry::nameSpace | ( | ) | const |
References m_namespace.
Referenced by YSymbolEntry::toXml().
|
inlinevirtual |
Reimplemented in YSymbolEntry.
void SymbolEntry::pop | ( | ) |
References m_recurse_stack, and m_value.
unsigned int SymbolEntry::position | ( | ) | const |
References m_position.
Referenced by setPosition().
void SymbolEntry::push | ( | ) |
References m_recurse_stack, and m_value.
|
private |
void SymbolEntry::setCategory | ( | SymbolEntry::category_t | cat | ) |
References m_category.
void SymbolEntry::setGlobal | ( | bool | global | ) |
References m_global.
void SymbolEntry::setNamespace | ( | const Y2Namespace * | name_space | ) |
References m_namespace.
void SymbolEntry::setPosition | ( | unsigned int | position | ) |
References m_position, and position().
Referenced by Y2Namespace::finish().
References Ustring::asString(), c_reference, YCPElement::isNull(), m_category, m_name, m_value, value(), y2debug, and y2error.
|
virtual |
Reimplemented in YSymbolEntry.
References Ustring::asString(), c_const, c_filename, c_function, c_module, c_namespace, c_predefined, c_reference, c_self, c_typedef, c_unspec, c_variable, catString(), m_category, m_global, m_name, m_namespace, m_type, Y2Namespace::name(), type(), y2debug, and y2error.
Referenced by YSymbolEntry::toString().
constTypePtr SymbolEntry::type | ( | ) | const |
References m_type.
Referenced by setType(), and toString().
|
virtual |
References c_reference, YCPElement::isNull(), m_category, m_value, and y2debug.
Referenced by setValue().
|
static |
|
static |
Referenced by Import::Import().
|
protected |
Referenced by category(), catString(), YSymbolEntry::code(), YSymbolEntry::declaration(), YSymbolEntry::onlyDeclared(), YSymbolEntry::payloadNamespace(), setCategory(), YSymbolEntry::setCode(), YSymbolEntry::setDeclaration(), YSymbolEntry::setPayloadNamespace(), YSymbolEntry::setTable(), setValue(), YSymbolEntry::table(), YSymbolEntry::toStream(), YSymbolEntry::toString(), toString(), value(), and YSymbolEntry::YSymbolEntry().
|
protected |
|
protected |
Referenced by name(), setValue(), YSymbolEntry::toStream(), YSymbolEntry::toString(), toString(), YSymbolEntry::toXml(), and YSymbolEntry::YSymbolEntry().
|
protected |
Referenced by nameSpace(), setNamespace(), YSymbolEntry::toString(), toString(), and YSymbolEntry::YSymbolEntry().
|
protected |
Referenced by position(), setPosition(), YSymbolEntry::toStream(), and YSymbolEntry::YSymbolEntry().
|
protected |
|
protected |
Referenced by setType(), YSymbolEntry::toStream(), YSymbolEntry::toString(), toString(), YSymbolEntry::toXml(), type(), and YSymbolEntry::YSymbolEntry().
|
protected |
Referenced by pop(), push(), setValue(), value(), and YSymbolEntry::YSymbolEntry().