Gyoji Compiler
|
Entity living inside a namespace. More...
#include <ns2.hpp>
Public Types | |
enum | EntityType { ENTITY_TYPE_IDENTIFIER , ENTITY_TYPE_TYPE , ENTITY_TYPE_CLASS , ENTITY_TYPE_NAMESPACE , ENTITY_TYPE_LABEL } |
Public Member Functions | |
const std::string & | get_name () const |
const EntityType & | get_type () const |
Entity living inside a namespace.
A namespace entity is anything that might live inside a namespace. This may be an identifier, a type, a class, or another namespace. Note that classes and namespaces also may contain namespaces of their own so that they can be nested.
const std::string & NS2Entity::get_name | ( | ) | const |
Returns the 'simple' name that is a leaf-node in a namespace. The namespace manages only the simple entity name and type, but carries no other semantic information. This exists to provide a unique fully-qualified name for each entity that needs a name. The semantics of the object being named are managed elsewhere in the context it is needed.
const NS2Entity::EntityType & NS2Entity::get_type | ( | ) | const |
The type of object being named. This may be a TYPE or an IDENTIFIER. If it is a TYPE, the specific type information is carried elsewhere.