libsesstype  2.0.0
Library for Session Types programming.
 All Classes Namespaces Files Functions
Public Types | Public Member Functions
sesstype::parameterised::RoleGrp Class Reference

Role Group (group of participants) of a protocol or session. More...

#include <role_grp.h>

Inheritance diagram for sesstype::parameterised::RoleGrp:
Inheritance graph
[legend]
Collaboration diagram for sesstype::parameterised::RoleGrp:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector
< sesstype::parameterised::Role * > 
RoleContainer

Public Member Functions

 RoleGrp ()
 RoleGrp constructor with "default_grp" as name.
 RoleGrp (std::string name)
 RoleGrp constructor.
 RoleGrp (const RoleGrp &role)
 RoleGrp copy constructor.
 ~RoleGrp () override
 RoleGrp destructor.
RoleGrpclone () const override
 clone a RoleGrp.
sesstype::Rolemember (unsigned int index) const
unsigned int num_members () const
void add_member (Role *role)
bool matches (sesstype::Role *other) const override
 Check if this Role contains another Role.
RoleContainer::const_iterator member_begin () const
 Start iterator for member.
RoleContainer::const_iterator member_end () const
 End iterator for member.
virtual void accept (util::RoleVisitor &v) override
 This subsumes accept in base class (but RoleVisitor is not a subclass)

Detailed Description

Role Group (group of participants) of a protocol or session.


Constructor & Destructor Documentation

RoleGrp destructor.

Roles in the RoleGrp are not freed (they are owned by the Protocol).


Member Function Documentation

Parameters:
[in]roleto add as member.
bool sesstype::parameterised::RoleGrp::matches ( sesstype::Role other) const [inline, override, virtual]

Check if this Role contains another Role.

Returns:
true if this Role contains another Role.

Reimplemented from sesstype::parameterised::Role.

sesstype::Role* sesstype::parameterised::RoleGrp::member ( unsigned int  index) const [inline]
Parameters:
[in]indexof the member Role.
Returns:
member Role.
Exceptions:
std::out_of_rangeif Role is not in the RoleGrp.
unsigned int sesstype::parameterised::RoleGrp::num_members ( ) const [inline]
Returns:
number of members.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions