classias::group_base Class Reference

Inheritance diagram for classias::group_base:

classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >

Detailed Description

Group number class.

The class implements the base interface for instances with group numbers.


Public Types

typedef int group_type
 A type representing a group number.

Public Member Functions

 group_base ()
 Constructs the object.
 group_base (const group_type &group)
 Constructs an object initialized by the specified number.
 group_base (const group_base &rho)
 Constructs an object that is a copy of another object.
group_baseoperator= (const group_base &rho)
 Assigns a new group number to the object.
virtual ~group_base ()
 Destructs the object.
void set_group (group_type group)
 Assigns a new group number to the object.
group_type get_group () const
 Obtains the current group number.

Protected Attributes

group_type m_group
 The group number.

Friends

bool operator== (const group_base &x, const group_base &y)
 Tests the equality of two group numbers.
bool operator!= (const group_base &x, const group_base &y)
 Tests the inequality of two groups.


Constructor & Destructor Documentation

classias::group_base::group_base ( const group_type group  )  [inline]

Constructs an object initialized by the specified number.

Parameters:
group The group number used to initialize the object.

classias::group_base::group_base ( const group_base rho  )  [inline]

Constructs an object that is a copy of another object.

Parameters:
rho The original object used to initialize the object.


Member Function Documentation

group_base& classias::group_base::operator= ( const group_base rho  )  [inline]

Assigns a new group number to the object.

Parameters:
rho The source object.
Return values:
group_base& The reference to this object.

void classias::group_base::set_group ( group_type  group  )  [inline]

Assigns a new group number to the object.

Parameters:
group The group number.

group_type classias::group_base::get_group (  )  const [inline]

Obtains the current group number.

Return values:
group_type The current group number.


Friends And Related Function Documentation

bool operator== ( const group_base x,
const group_base y 
) [friend]

Tests the equality of two group numbers.

Parameters:
x A group object.
y Another group object.
Return values:
bool true if the two group numbers are identical, false otherwise.

bool operator!= ( const group_base x,
const group_base y 
) [friend]

Tests the inequality of two groups.

Parameters:
x A group object.
y Another group object.
Return values:
bool true if the two group numbers are not identical, false otherwise.


Copyright (c) 2002-2009 by Naoaki Okazaki
Mon Dec 28 23:41:06 2009