0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
clanguml::sequence_diagram::model::activity Class Reference

Model of a sequence diagram activity. More...

Detailed Description

Model of a sequence diagram activity.

Definition at line 31 of file activity.h.

#include <activity.h>

Public Member Functions

 activity (eid_t id)
 Constructor.
 
void add_message (message m)
 Add a message call to the activity.
 
std::vector< message > & messages ()
 Get list of messages in the activity.
 
const std::vector< message > & messages () const
 Get list of messages in the activity.
 
eid_t from () const
 Get the id of activity parent participant.
 
void add_caller (eid_t caller)
 
const std::set< eid_t > & callers () const
 
void set_callers (std::set< eid_t > callers)
 

Private Attributes

eid_t from_
 
std::vector< messagemessages_
 
std::set< eid_tcallers_
 

Constructor & Destructor Documentation

◆ activity()

clanguml::sequence_diagram::model::activity::activity ( eid_t  id)

Constructor.

Parameters
idId of the participant parent for the activity

Definition at line 23 of file activity.cc.

24 : from_{id}
25{
26}

Member Function Documentation

◆ add_caller()

void clanguml::sequence_diagram::model::activity::add_caller ( eid_t  caller)

Definition at line 36 of file activity.cc.

36{ callers_.emplace(caller); }

◆ add_message()

void clanguml::sequence_diagram::model::activity::add_message ( message  m)

Add a message call to the activity.

Parameters
mMessage model

Definition at line 28 of file activity.cc.

28{ messages_.emplace_back(std::move(m)); }

◆ callers()

const std::set< eid_t > & clanguml::sequence_diagram::model::activity::callers ( ) const

Definition at line 38 of file activity.cc.

38{ return callers_; }

◆ from()

eid_t clanguml::sequence_diagram::model::activity::from ( ) const

Get the id of activity parent participant.

Returns
Id of activity participant

Definition at line 34 of file activity.cc.

34{ return from_; }

◆ messages() [1/2]

std::vector< message > & clanguml::sequence_diagram::model::activity::messages ( )

Get list of messages in the activity.

Returns
Reference to list of messages in the activity

Definition at line 30 of file activity.cc.

30{ return messages_; }

◆ messages() [2/2]

const std::vector< message > & clanguml::sequence_diagram::model::activity::messages ( ) const

Get list of messages in the activity.

Returns
Reference to list of messages in the activity

Definition at line 32 of file activity.cc.

32{ return messages_; }

◆ set_callers()

void clanguml::sequence_diagram::model::activity::set_callers ( std::set< eid_t callers)

Definition at line 40 of file activity.cc.

41{
42 callers_ = std::move(callers);
43}

Member Data Documentation

◆ callers_

std::set<eid_t> clanguml::sequence_diagram::model::activity::callers_
private

The set of caller ids, i.e. activities which send messages to this activity. This is necessary in order to optimize reverse call graph traversal for sequence diagrams with bounded end calls such as to and from_to.

Definition at line 92 of file activity.h.

◆ from_

eid_t clanguml::sequence_diagram::model::activity::from_
private

Id of this activity. All messages originating from this activity must have from property set to this

Definition at line 79 of file activity.h.

◆ messages_

std::vector<message> clanguml::sequence_diagram::model::activity::messages_
private

List of messages generated from this activity, in order.

Definition at line 84 of file activity.h.


The documentation for this class was generated from the following files: