Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents the declaration of a namespace and its members. More...
#include <omScriptingMirScopes.h>
Public Member Functions | |
NamespaceDeclaration () | |
Create a new namespace declaration object representing the global namespace. More... | |
NamespaceDeclaration (Visibility newVisibility, const Shared< Identifier > &newName) | |
Create a new namespace declaration object with the specified attributes. More... | |
Visibility | getVisibility () const |
Return an object representing the visibility type of this namespace declaration. More... | |
const Shared< Identifier > & | getName () const |
Return a pointer to an identifier representing the name of this namespace declaration. More... | |
Size | getFieldCount () const |
Return the number of fields that the declared namespace contains. More... | |
const Shared< Field > & | getField (Index fieldIndex) const |
Return a pointer to the field at the specified index that the declared namespace contains. More... | |
Bool | addField (const Shared< Field > &newField) |
Add a new field that should be a member of the declared namespace. More... | |
Size | getMethodCount () const |
Return the number of methods that the declared class has. More... | |
const Shared< Method > & | getMethod (Index methodIndex) const |
Return a pointer to the method at the specified index that the declared namespace contains. More... | |
Bool | addMethod (const Shared< Method > &newMethod) |
Add a new method that should be a member of the declared namespace. More... | |
Size | getOperatorCount () const |
Return the number of operators that the declared namespace has. More... | |
const Shared< Operator > & | getOperator (Index operatorIndex) const |
Return a pointer to the operator at the specified index that the declared namespace contains. More... | |
Bool | addOperator (const Shared< Operator > &newOperator) |
Add a new operator that should be a member of the declared namespace. More... | |
Size | getClassDeclarationCount () const |
Return the number of class declarations that the declared namespace contains. More... | |
const Shared< ClassDeclaration > & | getClassDeclaration (Index classDeclarationIndex) const |
Return a pointer to the class declaration at the specified index that the declared namespace contains. More... | |
Bool | addClassDeclaration (const Shared< ClassDeclaration > &newClassDeclaration) |
Add a new class declaration that the declared namespace should contain. More... | |
Size | getTypeDeclarationCount () const |
Return the number of type declarations that the declared namespace contains. More... | |
const Shared< TypeDeclaration > & | getTypeDeclaration (Index typeDeclarationIndex) const |
Return a pointer to the type declaration at the specified index that the declared namespace contains. More... | |
Bool | addTypeDeclaration (const Shared< TypeDeclaration > &newTypeDeclaration) |
Add a new type declaration that the declared namespace should contain. More... | |
Size | getImportCount () const |
Return the number of imports that the declared namespace contains. More... | |
const Shared< Import > & | getImport (Index importIndex) const |
Return a pointer to the import at the specified index that the declared namespace contains. More... | |
Bool | addImport (const Shared< Import > &newImport) |
Add a new import that the declared namespace should contain. More... | |
Size | getNamespaceDeclarationCount () const |
Return the number of namespace declarations that the declared namespace contains. More... | |
const Shared< NamespaceDeclaration > & | getNamespaceDeclaration (Index namespaceDeclarationIndex) const |
Return a pointer to the namespace declaration at the specified index that the declared namespace contains. More... | |
Bool | addNamespaceDeclaration (const Shared< NamespaceDeclaration > &newNamespaceDeclaration) |
Add a new namespace declaration that the declared namespace should contain. More... | |
Bool | findNamespaceWithName (const Shared< Identifier > &name, Shared< NamespaceDeclaration > &newNamespace) |
Find a namespace with the specified identifier name that is a member of this namespace. More... | |
Public Member Functions inherited from om::scripting::mir::lang::Declaration | |
DeclarationType | getDeclarationType () const |
Return the type of this declaration. More... | |
Public Member Functions inherited from om::scripting::mir::lang::ASTNode | |
ASTNode () | |
Create a new AST node with no node position specified. More... | |
ASTNode (const Position &newPosition) | |
Create a new AST node which corresponds to a token starting at the specified source code position. More... | |
virtual | ~ASTNode () |
Destroy this AST node object. More... | |
const Position & | getPosition () const |
Return an object representing the position of this AST node in the source code. More... | |
void | setPosition (const Position &newPosition) |
Set the position of this AST node in the source code. More... | |
Static Public Member Functions | |
static Shared< NamespaceDeclaration > | construct () |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More... | |
static Shared< NamespaceDeclaration > | construct (Visibility newVisibility, const Shared< Identifier > &newName) |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More... | |
Additional Inherited Members | |
Public Types inherited from om::scripting::mir::lang::Declaration | |
enum | DeclarationType { NAMESPACE, TYPE, ALIAS, CLASS, INTERFACE, FIELD, METHOD, OPERATOR, CONSTRUCTOR, DESTRUCTOR, VARIABLE } |
An enum that specifies the different types of type declarations. More... | |
Protected Member Functions inherited from om::scripting::mir::lang::Declaration | |
Declaration (DeclarationType newType) | |
Create a new declaration with the specified declaration type enum value. More... | |
A class that represents the declaration of a namespace and its members.
|
inline |
Create a new namespace declaration object representing the global namespace.
|
inline |
Create a new namespace declaration object with the specified attributes.
|
inline |
Return an object representing the visibility type of this namespace declaration.
|
inline |
Return a pointer to an identifier representing the name of this namespace declaration.
|
inline |
Return the number of fields that the declared namespace contains.
|
inline |
Return a pointer to the field at the specified index that the declared namespace contains.
|
inline |
Add a new field that should be a member of the declared namespace.
|
inline |
Return the number of methods that the declared class has.
|
inline |
Return a pointer to the method at the specified index that the declared namespace contains.
|
inline |
Add a new method that should be a member of the declared namespace.
|
inline |
Return the number of operators that the declared namespace has.
|
inline |
Return a pointer to the operator at the specified index that the declared namespace contains.
|
inline |
Add a new operator that should be a member of the declared namespace.
|
inline |
Return the number of class declarations that the declared namespace contains.
|
inline |
Return a pointer to the class declaration at the specified index that the declared namespace contains.
|
inline |
Add a new class declaration that the declared namespace should contain.
|
inline |
Return the number of type declarations that the declared namespace contains.
|
inline |
Return a pointer to the type declaration at the specified index that the declared namespace contains.
|
inline |
Add a new type declaration that the declared namespace should contain.
|
inline |
Return the number of imports that the declared namespace contains.
|
inline |
Return a pointer to the import at the specified index that the declared namespace contains.
|
inline |
Add a new import that the declared namespace should contain.
|
inline |
Return the number of namespace declarations that the declared namespace contains.
|
inline |
Return a pointer to the namespace declaration at the specified index that the declared namespace contains.
|
inline |
Add a new namespace declaration that the declared namespace should contain.
|
inline |
Find a namespace with the specified identifier name that is a member of this namespace.
|
inlinestatic |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.
|
inlinestatic |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.