#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) |
YCPValue | setValue (YCPValue value) |
YCPValue | value () const |
void | push () |
void | pop () |
virtual string | toString (bool with_type=true) 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) |
typedef std::stack<YCPValue> SymbolEntry::valuestack_t [protected] |
SymbolEntry::SymbolEntry | ( | const Y2Namespace * | name_space, | |
unsigned int | position, | |||
const char * | name, | |||
category_t | cat, | |||
constTypePtr | type | |||
) |
constructor
SymbolEntry::~SymbolEntry | ( | ) | [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().
bool SymbolEntry::isBuiltin | ( | ) | const [inline] |
References c_builtin, and m_category.
bool SymbolEntry::isFilename | ( | ) | const [inline] |
References c_filename, and m_category.
bool SymbolEntry::isFunction | ( | ) | const [inline] |
References c_function, and m_category.
bool SymbolEntry::isGlobal | ( | ) | const |
References m_global.
bool SymbolEntry::isModule | ( | ) | const [inline] |
bool SymbolEntry::isNamespace | ( | ) | const [inline] |
bool SymbolEntry::isPredefined | ( | ) | const [inline] |
References c_predefined, and m_category.
bool SymbolEntry::isReference | ( | ) | const [inline] |
References c_reference, and m_category.
bool SymbolEntry::isSelf | ( | ) | const [inline] |
bool SymbolEntry::isVariable | ( | ) | const [inline] |
References c_variable, and m_category.
bool SymbolEntry::likeNamespace | ( | ) | const [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.
virtual bool SymbolEntry::onlyDeclared | ( | ) | const [inline, virtual] |
Reimplemented in YSymbolEntry.
void SymbolEntry::pop | ( | ) |
References m_recurse_stack, and m_value.
unsigned int SymbolEntry::position | ( | ) | const |
References m_position.
void SymbolEntry::push | ( | ) |
References m_recurse_stack, and m_value.
SymbolEntry::REP_BODY | ( | SymbolEntry | ) | [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 | ) |
void SymbolEntry::setType | ( | constTypePtr | type | ) |
References m_type.
References Ustring::asString(), c_reference, YCPElement::isNull(), m_category, m_name, m_value, y2debug, and y2error.
string SymbolEntry::toString | ( | bool | with_type = true |
) | const [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.
constTypePtr SymbolEntry::type | ( | ) | const |
YCPValue SymbolEntry::value | ( | ) | const |
References c_reference, YCPElement::isNull(), m_category, m_value, and y2debug.
UstringHash * SymbolEntry::_nameHash = NULL [static] |
Ustring SymbolEntry::emptyUstring = Ustring ( *( SymbolEntry::_nameHash ? SymbolEntry::_nameHash : (SymbolEntry::_nameHash = new UstringHash)), "") [static] |
Referenced by Import::Import().
category_t SymbolEntry::m_category [protected] |
Referenced by category(), catString(), YSymbolEntry::code(), YSymbolEntry::declaration(), isBuiltin(), isFilename(), isFunction(), isModule(), isNamespace(), isPredefined(), isReference(), isSelf(), isVariable(), 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().
bool SymbolEntry::m_global [protected] |
Ustring SymbolEntry::m_name [protected] |
Referenced by name(), setValue(), YSymbolEntry::toStream(), YSymbolEntry::toString(), toString(), YSymbolEntry::toXml(), and YSymbolEntry::YSymbolEntry().
const Y2Namespace* SymbolEntry::m_namespace [protected] |
Referenced by nameSpace(), setNamespace(), YSymbolEntry::toString(), toString(), and YSymbolEntry::YSymbolEntry().
unsigned int SymbolEntry::m_position [protected] |
Referenced by position(), setPosition(), YSymbolEntry::toStream(), and YSymbolEntry::YSymbolEntry().
valuestack_t* SymbolEntry::m_recurse_stack [protected] |
constTypePtr SymbolEntry::m_type [protected] |
Referenced by setType(), YSymbolEntry::toStream(), YSymbolEntry::toString(), toString(), YSymbolEntry::toXml(), type(), and YSymbolEntry::YSymbolEntry().
YCPValue SymbolEntry::m_value [protected] |
Referenced by pop(), push(), setValue(), value(), and YSymbolEntry::YSymbolEntry().