|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
Represents a using-directive that opens a namespace's symbols into local scope. More...
#include <bond/compiler/parsenodes.h>
Public Member Functions | |
| UsingDirective (QualifiedIdentifier *identifier) | |
| Constructs a using-directive. | |
| virtual | ~UsingDirective () |
| Destroys a UsingDirective object. | |
| virtual void | Accept (ParseNodeVisitor &visitor) override |
| Dispatches this node to the given visitor. | |
| virtual void | Accept (ParseNodeVisitor &visitor) const override |
| Dispatches this node to the given visitor. | |
| virtual const Token * | GetContextToken () const override |
| Returns the token used as source context for diagnostics. | |
| QualifiedIdentifier * | GetIdentifier () |
| Returns the qualified identifier naming the namespace to open. | |
| const QualifiedIdentifier * | GetIdentifier () const |
| Returns the qualified identifier naming the namespace to open. | |
| void | SetNamespace (Symbol *space) |
| Sets the resolved namespace symbol that this directive opens. | |
| Symbol * | GetNamespace () |
| Returns the resolved namespace symbol that this directive opens, if any. | |
| const Symbol * | GetNamespace () const |
| Returns the resolved namespace symbol that this directive opens, if any. | |
| void | SetEnclosingNamespace (Symbol *space) |
| Sets the nearest namespace that encloses both this directive and the namespace it opens. | |
| Symbol * | GetEnclosingNamespace () |
| Returns the nearest namespace that encloses both this directive and the namespace it opens. | |
| const Symbol * | GetEnclosingNamespace () const |
| Returns the nearest namespace that encloses both this directive and the namespace it opens. | |
| UsingDirective * | GetNextUsingDirective () |
| Returns the next using-directive opened in the same local scope. | |
| const UsingDirective * | GetNextUsingDirective () const |
| Returns the next using-directive opened in the same local scope. | |
| void | SetNextUsingDirective (UsingDirective *next) |
| Links this directive into its enclosing scope's list of opened namespaces. | |
| Public Member Functions inherited from Bond::ListParseNode | |
| virtual | ~ListParseNode () |
| Destroys a ListParseNode object. | |
| ListParseNode * | GetNextNode () |
| Returns the next node in the list. | |
| const ListParseNode * | GetNextNode () const |
| Returns the next node in the list. | |
| void | SetNextNode (ListParseNode *next) |
| Sets the next node in the list. | |
| Public Member Functions inherited from Bond::ParseNode | |
| virtual | ~ParseNode () |
| Destroys a ParseNode object. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Bond::ListParseNode | |
| ListParseNode () | |
| Protected Member Functions inherited from Bond::ParseNode | |
| ParseNode () | |
Represents a using-directive that opens a namespace's symbols into local scope.
Never enters a symbol table; it is instead threaded into its enclosing local scope's list of opened namespaces (via its own dedicated next-pointer, separate from the ListParseNode next-pointer used to place it among the enclosing statement list). During unqualified lookup from within that scope, the opened namespace's members are treated as members of the nearest namespace that encloses both the directive and the opened namespace, as in C++.
|
inlineexplicit |
Constructs a using-directive.
| identifier | Qualified identifier naming the namespace to open. |
|
inlinevirtual |
Destroys a UsingDirective object.
|
inlineoverridevirtual |
Dispatches this node to the given visitor.
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
|
inlineoverridevirtual |
Dispatches this node to the given visitor.
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
|
inlineoverridevirtual |
Returns the token used as source context for diagnostics.
Implements Bond::ParseNode.
|
inline |
Returns the nearest namespace that encloses both this directive and the namespace it opens.
|
inline |
Returns the nearest namespace that encloses both this directive and the namespace it opens.
|
inline |
Returns the qualified identifier naming the namespace to open.
|
inline |
Returns the qualified identifier naming the namespace to open.
|
inline |
Returns the resolved namespace symbol that this directive opens, if any.
|
inline |
Returns the resolved namespace symbol that this directive opens, if any.
|
inline |
Returns the next using-directive opened in the same local scope.
|
inline |
Returns the next using-directive opened in the same local scope.
|
inline |
Sets the nearest namespace that encloses both this directive and the namespace it opens.
| space | The enclosing namespace, to whose members the opened namespace's members are added. |
|
inline |
Sets the resolved namespace symbol that this directive opens.
| space | Namespace symbol to open into the enclosing local scope. |
|
inline |
Links this directive into its enclosing scope's list of opened namespaces.
| next | Next using-directive in the scope's list. |