18 #ifndef FOEDUS_ATTACHABLE_HPP_
19 #define FOEDUS_ATTACHABLE_HPP_
57 template <
typename CONTROL_BLOCK>
91 virtual void attach(CONTROL_BLOCK* control_block) {
116 #endif // FOEDUS_ATTACHABLE_HPP_
void set_engine(Engine *engine)
Attachable(const Attachable &other)
#define CXX11_NULLPTR
Used in public headers in place of "nullptr" of C++11.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Attachable & operator=(const Attachable &other)
Forward declarations of classes in root package.
virtual void attach(CONTROL_BLOCK *control_block)
Attaches to the given shared memory.
Engine * engine_
Most attachable object stores an engine pointer (local engine), so we define it here.
Attachable(Engine *engine)
bool is_attached() const
Returns whether the object has been already attached to some shared memory.
CONTROL_BLOCK * control_block_
The shared data on shared memory that has been initialized in some SOC or master engine.
Database engine object that holds all resources and provides APIs.
Engine * get_engine() const
Attachable(CONTROL_BLOCK *control_block)
Attachable Resources on Shared Memory.
Attachable(Engine *engine, CONTROL_BLOCK *control_block)
CONTROL_BLOCK * get_control_block() const