ContextValues are a mechanism to share data between plugins using the atscppapi. More...
#include <Transaction.h>
| Public Member Functions | |
| virtual | ~ContextValue () | 
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.
| virtual atscppapi::Transaction::ContextValue::~ContextValue | ( | ) |  [inline, virtual] | 
Definition at line 76 of file Transaction.h.
 1.7.1
 1.7.1