eosim::utils::BEventMap                        EoSimulator Programmer's Manual

 

NAME

      BEventMap: Mapping of B Events

 

SYNOPSIS

      #include <eosim/utils/beventmap.hpp>

 

namespace eosim {

namespace utils {

     

class BEventMap {

public:

BEventMap ();

~BEventMap ();

void put (core::BEvent* elem_);

void remove (std::string key_);

core::BEvent* operator[] (std::string key_);

unsigned int size();

};

     

}

}

 

DESCRIPTION

This container stores BEvents, using their name as key. It is used by Model to register BEvent.

 

CLASS OPERATIONS

BEventMap ():

      The constructor creates an empty BEventMap.

     

~BEventMap ():

      The destructor of BEventMap. This operation doesn’t delete any BEvents stored.

     

void put (core::BEvent* elem_):

            This operation adds elem_ to the map. If elem_’s name is equal to the name of another BEvent already stored in the map, the simulation aborts immediately displaying an error message.

           

void remove (std::string key_):

This operation remove the element whose name is key_. If there isn’t any element whose key is key_, the simulation aborts immediately displaying an error message.

 

core::BEvent* operator[] (std::string key_):

            This operation finds the BEvent whose name is key_. The use of this operation is either bMap[key] or bMap.operator[](key). If the map is empty or there isn’t any element whose name is key_, the simulation aborts immediately displaying an error message.

 

unsigned int size():

            This operation returns the size of the map.

 

SEE ALSO

eosim::core::BEvent

eosim::core::Model