Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Member Functions | List of all members
om::scripting::mir::lang::NamespaceDeclaration Class Reference

A class that represents the declaration of a namespace and its members. More...

#include <omScriptingMirScopes.h>

Inheritance diagram for om::scripting::mir::lang::NamespaceDeclaration:
om::scripting::mir::lang::Declaration om::scripting::mir::lang::ASTNode

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 PositiongetPosition () 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< NamespaceDeclarationconstruct ()
 Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More...
 
static Shared< NamespaceDeclarationconstruct (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...
 

Detailed Description

A class that represents the declaration of a namespace and its members.

Constructor & Destructor Documentation

om::scripting::mir::lang::NamespaceDeclaration::NamespaceDeclaration ( )
inline

Create a new namespace declaration object representing the global namespace.

om::scripting::mir::lang::NamespaceDeclaration::NamespaceDeclaration ( Visibility  newVisibility,
const Shared< Identifier > &  newName 
)
inline

Create a new namespace declaration object with the specified attributes.

Member Function Documentation

Visibility om::scripting::mir::lang::NamespaceDeclaration::getVisibility ( ) const
inline

Return an object representing the visibility type of this namespace declaration.

const Shared<Identifier>& om::scripting::mir::lang::NamespaceDeclaration::getName ( ) const
inline

Return a pointer to an identifier representing the name of this namespace declaration.

Size om::scripting::mir::lang::NamespaceDeclaration::getFieldCount ( ) const
inline

Return the number of fields that the declared namespace contains.

const Shared<Field>& om::scripting::mir::lang::NamespaceDeclaration::getField ( Index  fieldIndex) const
inline

Return a pointer to the field at the specified index that the declared namespace contains.

Bool om::scripting::mir::lang::NamespaceDeclaration::addField ( const Shared< Field > &  newField)
inline

Add a new field that should be a member of the declared namespace.

Size om::scripting::mir::lang::NamespaceDeclaration::getMethodCount ( ) const
inline

Return the number of methods that the declared class has.

const Shared<Method>& om::scripting::mir::lang::NamespaceDeclaration::getMethod ( Index  methodIndex) const
inline

Return a pointer to the method at the specified index that the declared namespace contains.

Bool om::scripting::mir::lang::NamespaceDeclaration::addMethod ( const Shared< Method > &  newMethod)
inline

Add a new method that should be a member of the declared namespace.

Size om::scripting::mir::lang::NamespaceDeclaration::getOperatorCount ( ) const
inline

Return the number of operators that the declared namespace has.

const Shared<Operator>& om::scripting::mir::lang::NamespaceDeclaration::getOperator ( Index  operatorIndex) const
inline

Return a pointer to the operator at the specified index that the declared namespace contains.

Bool om::scripting::mir::lang::NamespaceDeclaration::addOperator ( const Shared< Operator > &  newOperator)
inline

Add a new operator that should be a member of the declared namespace.

Size om::scripting::mir::lang::NamespaceDeclaration::getClassDeclarationCount ( ) const
inline

Return the number of class declarations that the declared namespace contains.

const Shared<ClassDeclaration>& om::scripting::mir::lang::NamespaceDeclaration::getClassDeclaration ( Index  classDeclarationIndex) const
inline

Return a pointer to the class declaration at the specified index that the declared namespace contains.

Bool om::scripting::mir::lang::NamespaceDeclaration::addClassDeclaration ( const Shared< ClassDeclaration > &  newClassDeclaration)
inline

Add a new class declaration that the declared namespace should contain.

Size om::scripting::mir::lang::NamespaceDeclaration::getTypeDeclarationCount ( ) const
inline

Return the number of type declarations that the declared namespace contains.

const Shared<TypeDeclaration>& om::scripting::mir::lang::NamespaceDeclaration::getTypeDeclaration ( Index  typeDeclarationIndex) const
inline

Return a pointer to the type declaration at the specified index that the declared namespace contains.

Bool om::scripting::mir::lang::NamespaceDeclaration::addTypeDeclaration ( const Shared< TypeDeclaration > &  newTypeDeclaration)
inline

Add a new type declaration that the declared namespace should contain.

Size om::scripting::mir::lang::NamespaceDeclaration::getImportCount ( ) const
inline

Return the number of imports that the declared namespace contains.

const Shared<Import>& om::scripting::mir::lang::NamespaceDeclaration::getImport ( Index  importIndex) const
inline

Return a pointer to the import at the specified index that the declared namespace contains.

Bool om::scripting::mir::lang::NamespaceDeclaration::addImport ( const Shared< Import > &  newImport)
inline

Add a new import that the declared namespace should contain.

Size om::scripting::mir::lang::NamespaceDeclaration::getNamespaceDeclarationCount ( ) const
inline

Return the number of namespace declarations that the declared namespace contains.

const Shared<NamespaceDeclaration>& om::scripting::mir::lang::NamespaceDeclaration::getNamespaceDeclaration ( Index  namespaceDeclarationIndex) const
inline

Return a pointer to the namespace declaration at the specified index that the declared namespace contains.

Bool om::scripting::mir::lang::NamespaceDeclaration::addNamespaceDeclaration ( const Shared< NamespaceDeclaration > &  newNamespaceDeclaration)
inline

Add a new namespace declaration that the declared namespace should contain.

Bool om::scripting::mir::lang::NamespaceDeclaration::findNamespaceWithName ( const Shared< Identifier > &  name,
Shared< NamespaceDeclaration > &  newNamespace 
)
inline

Find a namespace with the specified identifier name that is a member of this namespace.

static Shared<NamespaceDeclaration> om::scripting::mir::lang::NamespaceDeclaration::construct ( )
inlinestatic

Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.

static Shared<NamespaceDeclaration> om::scripting::mir::lang::NamespaceDeclaration::construct ( Visibility  newVisibility,
const Shared< Identifier > &  newName 
)
inlinestatic

Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.


The documentation for this class was generated from the following file: