Public Member Functions

atscppapi::Transaction::ContextValue Class Reference

ContextValues are a mechanism to share data between plugins using the atscppapi. More...

#include <Transaction.h>

Public Member Functions

virtual ~ContextValue ()

Detailed Description

ContextValues are a mechanism to share data between plugins using the atscppapi.

Any data can be shared so long as it extends ContextValue, a simple example might be:

     struct mydata : ContextValue {
       int id_;
       string foo_;
       mydata(int id, string foo) : id_(id), foo_(foo) { }
     }

     Transaction.setContextValue("some-key", shared_ptr(new mydata(12, "hello")));

     // From another plugin you'll have access to this contextual data:
     shared_ptr<Transaction.getContextValue("some-key")

Because getContextValue() and setContextValue() take shared pointers you dont have to worry about the cleanup as that will happen automatically so long as you dont have shared_ptrs that cannot go out of scope.

Definition at line 74 of file Transaction.h.


Constructor & Destructor Documentation

virtual atscppapi::Transaction::ContextValue::~ContextValue (  )  [inline, virtual]

Definition at line 76 of file Transaction.h.


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