ContRap-Core
Public Member Functions | Protected Attributes

crp::Identifier Class Reference

Class Identifier is an object which represents identifiers. More...

#include <identifier.h>

Inheritance diagram for crp::Identifier:
crp::Object crp::Parameter

Public Member Functions

 Identifier (const std::string &name="", const SPtr< Scope > &scope=0)
 Identifier constructor.
virtual ~Identifier ()
 Virtual destructor.
virtual std::string get_name () const
 Returns the name of the object.
virtual std::string get_type_name () const
 Returns the type of the object.
virtual Type get_type () const
 Returns the enumerated type of the object.
void set_scope (const SPtr< Scope > &scope)
 Sets a new home scope of the identifier.
const SPtr< Scope > & get_scope () const
 Returns the home scope of the identifier.
virtual std::string to_string () const
 Converts the object to a non-formatted string.

Protected Attributes

std::string name
 Literal name of the identifier.
SPtr< Scopescope
 Scope where the identifier has to be searched for.

Detailed Description

Class Identifier is an object which represents identifiers.


Constructor & Destructor Documentation

crp::Identifier::Identifier ( const std::string &  name = "",
const SPtr< Scope > &  scope = 0 
)

Identifier constructor.

Parameters:
nameName of the identifier
scopeScope of the identifier
virtual crp::Identifier::~Identifier ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

virtual std::string crp::Identifier::get_name ( ) const [inline, virtual]

Returns the name of the object.

Returns:
Name of the object
const SPtr<Scope>& crp::Identifier::get_scope ( ) const [inline]

Returns the home scope of the identifier.

Returns:
scope Scope of the identifier
virtual Type crp::Identifier::get_type ( ) const [inline, virtual]

Returns the enumerated type of the object.

Returns:
Type of the object

Reimplemented from crp::Object.

virtual std::string crp::Identifier::get_type_name ( ) const [inline, virtual]

Returns the type of the object.

Returns:
Type of the object

Reimplemented from crp::Object.

void crp::Identifier::set_scope ( const SPtr< Scope > &  scope) [inline]

Sets a new home scope of the identifier.

Parameters:
scopeScope of the identifier
virtual std::string crp::Identifier::to_string ( ) const [virtual]

Converts the object to a non-formatted string.

This method is thought to be used for debugging purposes only.

Returns:
String representation of the object

Reimplemented from crp::Object.


Field Documentation

std::string crp::Identifier::name [protected]

Literal name of the identifier.

Scope where the identifier has to be searched for.


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