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::ClassDeclaration Class Reference

A class that represents the declaration of a class type. More...

#include <omScriptingMirClassDeclaration.h>

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

Public Member Functions

 ClassDeclaration (Visibility newVisibility, const Shared< Identifier > &newName, const Shared< TemplateDeclaration > &newTemplateDeclaration, const Shared< lang::Type > &newSuperClass, Bool newIsInterface, Bool newIsFinal)
 Create a new class declaration object with the specified attributes. More...
 
Visibility getVisibility () const
 Return an object representing the visibility type of this class declaration. More...
 
void setVisibility (Visibility newVisibility)
 Set the visibility of this class declaration to the specified type. More...
 
const Shared< Identifier > & getName () const
 Return a pointer to an identifier representing the name of this class declaration. More...
 
const Shared< TemplateDeclaration > & getTemplateDeclaration () const
 Return an optionally NULL pointer to the template declaration of this class. More...
 
Bool getIsTemplate () const
 Return whether or not this class declaration is a template. More...
 
const Shared< lang::Type > & getSuperClass () const
 Return a pointer to the base type of this class declaration. More...
 
Size getInterfaceCount () const
 Return the number of interfaces that the declared class implements. More...
 
const Shared< lang::Type > & getInterface (Index interfaceIndex) const
 Return a pointer to the interface at the specified index that the declared class implements. More...
 
Bool addInterface (const Shared< lang::Type > &newInterface)
 Add a new interface that the declared class should implement. More...
 
Size getFieldCount () const
 Return the number of fields that the declared class contains. More...
 
const Shared< Field > & getField (Index fieldIndex) const
 Return a pointer to the field at the specified index that the declared class contains. More...
 
Bool addField (const Shared< Field > &newField)
 Add a new field that should be a member of the declared class. 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 class contains. More...
 
Bool addMethod (const Shared< Method > &newMethod)
 Add a new method that should be a member of the declared class. More...
 
Size getOperatorCount () const
 Return the number of operators that the declared class has. More...
 
const Shared< Operator > & getOperator (Index operatorIndex) const
 Return a pointer to the operator at the specified index that the declared class contains. More...
 
Bool addOperator (const Shared< Operator > &newOperator)
 Add a new operator that should be a member of the declared class. More...
 
Size getConstructorCount () const
 Return the number of constructors that the declared class has. More...
 
const Shared< Constructor > & getConstructor (Index constructorIndex) const
 Return a pointer to the constructor at the specified index that the declared class contains. More...
 
Bool addConstructor (const Shared< Constructor > &newConstructor)
 Add a new constructor that should be a member of the declared class. More...
 
Size getClassDeclarationCount () const
 Return the number of class declarations that the declared class contains. More...
 
const Shared< ClassDeclaration > & getClassDeclaration (Index classDeclarationIndex) const
 Return a pointer to the class declaration at the specified index that the declared class contains. More...
 
Bool addClassDeclaration (const Shared< ClassDeclaration > &newClassDeclaration)
 Add a new class declaration that the declared class should contain. More...
 
Size getTypeDeclarationCount () const
 Return the number of type declarations that the declared type contains. More...
 
const Shared< TypeDeclaration > & getTypeDeclaration (Index typeDeclarationIndex) const
 Return a pointer to the type declaration at the specified index that the declared type contains. More...
 
Bool addTypeDeclaration (const Shared< TypeDeclaration > &newTypeDeclaration)
 Add a new type declaration that the declared type should contain. More...
 
Bool getIsInterface () const
 Return whether or not this class declaration is an interface. More...
 
Bool getIsFinal () const
 Return whether or not this class declaration is final (can't be inherited from). 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< ClassDeclarationconstruct (Visibility newVisibility, const Shared< Identifier > &newName, const Shared< TemplateDeclaration > &newTemplateDeclaration, const Shared< lang::Type > &newSuperClass, Bool newIsInterface, Bool newIsFinal)
 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 class type.

Constructor & Destructor Documentation

om::scripting::mir::lang::ClassDeclaration::ClassDeclaration ( Visibility  newVisibility,
const Shared< Identifier > &  newName,
const Shared< TemplateDeclaration > &  newTemplateDeclaration,
const Shared< lang::Type > &  newSuperClass,
Bool  newIsInterface,
Bool  newIsFinal 
)
inline

Create a new class declaration object with the specified attributes.

Member Function Documentation

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

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

void om::scripting::mir::lang::ClassDeclaration::setVisibility ( Visibility  newVisibility)
inline

Set the visibility of this class declaration to the specified type.

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

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

const Shared<TemplateDeclaration>& om::scripting::mir::lang::ClassDeclaration::getTemplateDeclaration ( ) const
inline

Return an optionally NULL pointer to the template declaration of this class.

Bool om::scripting::mir::lang::ClassDeclaration::getIsTemplate ( ) const
inline

Return whether or not this class declaration is a template.

const Shared<lang::Type>& om::scripting::mir::lang::ClassDeclaration::getSuperClass ( ) const
inline

Return a pointer to the base type of this class declaration.

Size om::scripting::mir::lang::ClassDeclaration::getInterfaceCount ( ) const
inline

Return the number of interfaces that the declared class implements.

const Shared<lang::Type>& om::scripting::mir::lang::ClassDeclaration::getInterface ( Index  interfaceIndex) const
inline

Return a pointer to the interface at the specified index that the declared class implements.

Bool om::scripting::mir::lang::ClassDeclaration::addInterface ( const Shared< lang::Type > &  newInterface)
inline

Add a new interface that the declared class should implement.

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

Return the number of fields that the declared class contains.

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

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

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

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

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

Return the number of methods that the declared class has.

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

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

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

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

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

Return the number of operators that the declared class has.

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

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

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

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

Size om::scripting::mir::lang::ClassDeclaration::getConstructorCount ( ) const
inline

Return the number of constructors that the declared class has.

const Shared<Constructor>& om::scripting::mir::lang::ClassDeclaration::getConstructor ( Index  constructorIndex) const
inline

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

Bool om::scripting::mir::lang::ClassDeclaration::addConstructor ( const Shared< Constructor > &  newConstructor)
inline

Add a new constructor that should be a member of the declared class.

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

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

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

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

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

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

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

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

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

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

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

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

Bool om::scripting::mir::lang::ClassDeclaration::getIsInterface ( ) const
inline

Return whether or not this class declaration is an interface.

Bool om::scripting::mir::lang::ClassDeclaration::getIsFinal ( ) const
inline

Return whether or not this class declaration is final (can't be inherited from).

static Shared<ClassDeclaration> om::scripting::mir::lang::ClassDeclaration::construct ( Visibility  newVisibility,
const Shared< Identifier > &  newName,
const Shared< TemplateDeclaration > &  newTemplateDeclaration,
const Shared< lang::Type > &  newSuperClass,
Bool  newIsInterface,
Bool  newIsFinal 
)
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: