#include <StudyGuts.h>
This is in a separate header file from Study because only people who are extending the Study class to make their own Studies need to be aware of the details. End users access only methods from the Study class and classes derived from Study, never anything from Study::Guts or its derived classes.
Below is the physical layout of memory for a Study, and which portions are allocated by the client program and which by the binary library code. For binary compatiblity, only the side which allocated a piece of memory can access it. So for example, the client code can use the C++ Study::Guts Virtual Function Table (VFT) to call the concrete Guts methods. But the library side, when calling those same methods, must go through its own explicitly- managed VFT since it can't know what ordering was used for the methods in the VFT on the client side.
CLIENT SIDE . LIBRARY SIDE Study Study::Guts . Study::Guts::GutsRep --------------- ------------------ . ------------- | Study::Guts* | --> | Study::GutsRep* | --> | GutsRep | --------------- ------------------ . | | ^ | Concrete Guts | . | Position | | | class data and | . | independent | =============== | client-side VFT | . | Guts VFT | Concrete Study ------------------ . | | adds no data . | Other opaque| members . | stuff | . -------------
If the concrete Study::Guts class also has an opaque implementation, as it will for concrete Studies provided by the SimTK Core, then the Study author should expose only the data-free handle class derived from Study.
Public Member Functions | |
Guts (const String &name="<UNNAMED STUDY>", const String &version="0.0.0") | |
virtual | ~Guts () |
const String & | getName () const |
const String & | getVersion () const |
const Study & | getStudy () const |
Study & | updStudy () |
void | setOwnerHandle (Study &) |
bool | hasOwnerHandle () const |
Guts (class GutsRep *r) | |
bool | hasRep () const |
const GutsRep & | getRep () const |
GutsRep & | updRep () const |
Study::Guts * | clone () const |
Static Public Member Functions | |
static void | destruct (Study::Guts *) |
Protected Member Functions | |
Guts (const Guts &) | |
virtual Study::Guts * | cloneImpl () const =0 |
Friends | |
class | GutsRep |
void | systemDestructImplLocator (Study::Guts *) |
Study::Guts * | systemCloneImplLocator (const Study::Guts &) |
virtual ~Guts | ( | ) | [inline, virtual] |
Guts | ( | class GutsRep * | r | ) | [inline, explicit] |
const String& getName | ( | ) | const |
const String& getVersion | ( | ) | const |
const Study& getStudy | ( | ) | const |
Study& updStudy | ( | ) |
void setOwnerHandle | ( | Study & | ) |
bool hasOwnerHandle | ( | ) | const |
bool hasRep | ( | ) | const [inline] |
const GutsRep& getRep | ( | ) | const [inline] |
GutsRep& updRep | ( | ) | const [inline] |
static void destruct | ( | Study::Guts * | ) | [static] |
Study::Guts* clone | ( | ) | const |
virtual Study::Guts* cloneImpl | ( | ) | const [protected, pure virtual] |
friend class GutsRep [friend] |
void systemDestructImplLocator | ( | Study::Guts * | sysp | ) | [friend] |
Referenced by Study::Guts::Guts().
Study::Guts* systemCloneImplLocator | ( | const Study::Guts & | sys | ) | [friend] |
Referenced by Study::Guts::Guts().