Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Attributes
Arc::MessageContext Class Reference

Handler for content of message context. More...

#include <Message.h>

Collaboration diagram for Arc::MessageContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MessageContext (void)
 ~MessageContext (void)
void Add (const std::string &name, MessageContextElement *element)
 Provided element is taken over by this class.
MessageContextElementoperator[] (const std::string &id)

Private Attributes

std::map< std::string,
MessageContextElement * > 
elements_

Detailed Description

Handler for content of message context.

This class is a container for objects derived from MessageContextElement. It gets associated with Message object usually by first MCC in a chain and is kept as long as connection persists.

Definition at line 32 of file Message.h.


Constructor & Destructor Documentation

Definition at line 10 of file Message.cpp.

                                   {
}

Definition at line 13 of file Message.cpp.

                                    {
  std::map<std::string,MessageContextElement*>::iterator i;
  for(i=elements_.begin();i!=elements_.end();++i) {
    delete i->second;
  };
}

Member Function Documentation

void Arc::MessageContext::Add ( const std::string &  name,
MessageContextElement element 
)

Provided element is taken over by this class.

It is remembered by it and destroyed when this class is destroyed.

Definition at line 20 of file Message.cpp.

                                                                             {
  MessageContextElement* old = operator[](name);
  elements_[name]=element;
  if(old) delete old;
}

Here is the call graph for this function:

Here is the caller graph for this function:

MessageContextElement * Arc::MessageContext::operator[] ( const std::string &  id)

Definition at line 26 of file Message.cpp.

                                                                     {
  std::map<std::string,MessageContextElement*>::iterator i;
  i=elements_.find(id);
  if(i == elements_.end()) return NULL;
  return i->second;
}

Here is the caller graph for this function:


Member Data Documentation

std::map<std::string,MessageContextElement*> Arc::MessageContext::elements_ [private]

Definition at line 34 of file Message.h.


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