NamedObject Class Reference
[PEARL.base]

Base class for named entities with a numerical identifier. More...

#include <NamedObject.h>

Inheritance diagram for NamedObject:

IdObject Machine Metric Node Process Region Thread

List of all members.

Public Member Functions

Get & set object name
std::string get_name () const
void set_name (const std::string &name)

Protected Member Functions

Constructors & destructor
 NamedObject (ident_t id, const std::string &name)

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &stream, const NamedObject &item)


Detailed Description

The class NamedObject serves as a base class for all entities that are named and have a numerical identifier. It provides the basic functionality to get and set the object ID (inherited from IdObject) as well as the name of the object.

Constructor & Destructor Documentation

NamedObject ( ident_t  id,
const std::string &  name 
) [protected]

Creates a new instance and sets its identifier and name to the given parameters id and name, respectively.

Parameters:
id Object identifier
name Object name


Member Function Documentation

string get_name (  )  const

Returns the object's name.

Returns:
Object name

void set_name ( const std::string &  name  ) 

Sets (i.e., overwrites) the object's name with the given parameter name.

Parameters:
name New object name


Friends And Related Function Documentation

ostream & operator<< ( std::ostream &  stream,
const NamedObject item 
) [related]

Writes the numerical identifier and the name of the given NamedObject instance item to the output stream stream.

Parameters:
stream Output stream
item NamedObject instance
Returns:
Output stream


SCALASCA    Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre