PEARL
Parallel Event Access and Replay Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Attributes | Friends | Related Functions
pearl::LocationGroup Class Reference

Interface of location group definition representations. More...

#include <pearl/LocationGroup.h>

List of all members.

Public Types

enum  Type { TYPE_UNKNOWN, TYPE_PROCESS, NUMBER_OF_TYPES }
 Location group types. More...
typedef uint32_t IdType
 Location group definition identifier type.

Public Member Functions

IdType getId () const
 Get global identifier.
const StringgetName () const
 Get location group name.
virtual Type getType () const =0
 Get location group type.
SystemNodegetParent () const
 Get parent node.
uint32_t numLocations () const
 Get number of locations.
const LocationgetLocation (uint32_t index) const
 Get location.

Static Public Attributes

static const IdType NO_ID = (~static_cast<IdType>(0))
 Numerical identifier used for undefined loction group definitions.

Friends

class Location
class SystemNode
std::ostream & operator<< (std::ostream &stream, const LocationGroup &item)

Related Functions

(Note that these are not member functions.)

bool operator== (const LocationGroup &lhs, const LocationGroup &rhs)
 Equality operator.
bool operator!= (const LocationGroup &lhs, const LocationGroup &rhs)
 Inequality operator.
Stream I/O functions
std::ostream & operator<< (std::ostream &stream, const LocationGroup &item)
 Stream output operator.

Constructors & destructor

virtual ~LocationGroup ()
 Destructor.
 LocationGroup (IdType id, const String &name, SystemNode *parent)
 Constructor.

Detailed Description

The abstract base class LocationGroup defines the interface of location group representations which provide information about logical (i.e., software-related) nodes in the system hierarchy, typically representing individual UNIX/MPI processes. Location groups are characterized by a name, a type, and a parent node (of type SystemNode) in the system hierarchy. In addition, one or more Location objects can be attached to a location group. The numerical identifiers of the individual location groups are globally defined and continuously enumerated, i.e., the ID is element of [0,#location_groups-1].


Member Typedef Documentation

typedef uint32_t pearl::LocationGroup::IdType

Member Enumeration Documentation

Every location group has a type field associated to it which encodes more specific information about the group.

Enumerator:
TYPE_UNKNOWN 

Unknown type, used only if no other type fits.

TYPE_PROCESS 

Location group referring to an UNIX/MPI process

NUMBER_OF_TYPES 

Not a valid type, for internal use only.


Constructor & Destructor Documentation

virtual pearl::LocationGroup::~LocationGroup ( ) [virtual]

Releases all allocated resources and destroys the instance.

pearl::LocationGroup::LocationGroup ( IdType  id,
const String name,
SystemNode parent 
) [protected]

Creates a new location group definition instance and initializes it with the given values.

Parameters:
idGlobal location group identifier
nameGroup name
parentParent node in system tree (non-NULL)

Member Function Documentation

Returns the global identifier of the location group definition.

Returns:
Global identifier
const Location& pearl::LocationGroup::getLocation ( uint32_t  index) const

Returns the associated location stored at the given index in the range [0,#stored_locations-1].

Parameters:
indexLocation index
Returns:
Location

Returns the string definition storing the location group's name. If this information is not available, String::UNDEFINED is returned.

Returns:
Location group name

Returns a pointer to the parent node in the system tree.

Returns:
Parent node
virtual Type pearl::LocationGroup::getType ( ) const [pure virtual]

Returns the location group type, encoding more detailed information. See the documentation of LocationGroup::Type for details.

Returns:
Location group type

Returns the number of associated locations.

Returns:
Number of locations

Friends And Related Function Documentation

friend class Location [friend]
bool operator!= ( const LocationGroup lhs,
const LocationGroup rhs 
) [related]

Compares two location group definition objects lhs and rhs for inequality. Two groups are considered unequal if either their IDs, names, types, or parents differ. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the location group definitions differ, false otherwise.
std::ostream& operator<< ( std::ostream &  stream,
const LocationGroup item 
) [friend]
std::ostream & operator<< ( std::ostream &  stream,
const LocationGroup item 
) [related]

Prints the contents of the given location group definition object item to an output stream in a human-readable form.

Parameters:
streamOutput stream
itemLocation group definition object
Returns:
Output stream
bool operator== ( const LocationGroup lhs,
const LocationGroup rhs 
) [related]

Compares two location group definition objects lhs and rhs for equality. Two groups are considered equal if their identifiers, names, types, and parents are identical. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the location group definitions are equal, false otherwise.
friend class SystemNode [friend]

Member Data Documentation

const IdType pearl::LocationGroup::NO_ID = (~static_cast<IdType>(0)) [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Scalasca    Copyright © 1998–2014 Forschungszentrum Jülich GmbH, Jülich Supercomputing Centre
Copyright © 2009–2014 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming