libsesstype  2.0.0
Library for Session Types programming.
 All Classes Namespaces Files Functions
Public Member Functions
sesstype::ModuleTmpl< ImportType, SessionType > Class Template Reference

Module is a container class for multiple logically related Sessions. More...

#include <module.h>

Inheritance diagram for sesstype::ModuleTmpl< ImportType, SessionType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ModuleTmpl ()
 Module constructor with "default" as Module name.
 ModuleTmpl (std::string name)
 Module constructor.
virtual ~ModuleTmpl ()
 Module destructor.
std::string name () const
void set_name (std::string name)
 Replace Module name.
void add_session (SessionType *session)
unsigned int num_sessions () const
bool has_session (std::string name) const
 Test if Session is in Module.
SessionType * session (std::string name) const
SessionContainer::const_iterator session_begin () const
SessionContainer::const_iterator session_end () const
void add_import (ImportType *import)
unsigned int num_imports () const
bool has_import (std::string name) const
 Test if Import is in Module.
ImportType * import (std::string name) const
ImportContainer::const_iterator import_begin () const
ImportContainer::const_iterator import_end () const

Detailed Description

template<class ImportType, class SessionType>
class sesstype::ModuleTmpl< ImportType, SessionType >

Module is a container class for multiple logically related Sessions.


Member Function Documentation

template<class ImportType , class SessionType >
void sesstype::ModuleTmpl< ImportType, SessionType >::add_import ( ImportType *  import) [inline]
Parameters:
[in]importto add to Module.
template<class ImportType , class SessionType >
void sesstype::ModuleTmpl< ImportType, SessionType >::add_session ( SessionType *  session) [inline]
Parameters:
[in]Sessionto add as component of Module.
template<class ImportType , class SessionType >
bool sesstype::ModuleTmpl< ImportType, SessionType >::has_import ( std::string  name) const [inline]

Test if Import is in Module.

Returns:
true if name is an Import (or alias) in Module.
template<class ImportType , class SessionType >
bool sesstype::ModuleTmpl< ImportType, SessionType >::has_session ( std::string  name) const [inline]

Test if Session is in Module.

Returns:
true if name is a Session in Module.
template<class ImportType , class SessionType >
ImportType* sesstype::ModuleTmpl< ImportType, SessionType >::import ( std::string  name) const [inline]

This returns the original Import if alias is matched.

Returns:
Import named (or with alias)name.
Exceptions:
std::out_of_rangeif not found.
template<class ImportType , class SessionType >
std::string sesstype::ModuleTmpl< ImportType, SessionType >::name ( ) const [inline]
Returns:
name of Module.
template<class ImportType , class SessionType >
unsigned int sesstype::ModuleTmpl< ImportType, SessionType >::num_sessions ( ) const [inline]
Returns:
number of Session in Module.
template<class ImportType , class SessionType >
SessionType* sesstype::ModuleTmpl< ImportType, SessionType >::session ( std::string  name) const [inline]
Returns:
Session named name.
Exceptions:
std::out_of_rangeif not found.
template<class ImportType , class SessionType >
void sesstype::ModuleTmpl< ImportType, SessionType >::set_name ( std::string  name) [inline]

Replace Module name.

Parameters:
[in]nameof Module to replace with.

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