Virtual Testbed
Ship dynamics simulator for extreme conditions
Public Member Functions | List of all members
vtb::guile::Aspect< T > Class Template Reference

Aspect that extends Guile-unaware classes and provides a pointer to the corresponding wrapper object. More...

#include <wrapper.hh>

Inheritance diagram for vtb::guile::Aspect< T >:
[legend]
Collaboration diagram for vtb::guile::Aspect< T >:
[legend]

Public Member Functions

 Aspect (const T &rhs)
 
 Aspect (T &&rhs)
 
void wrapper (wrapper_type *rhs)
 
wrapper_typewrapper ()
 
const wrapper_typewrapper () const
 

Detailed Description

template<class T>
class vtb::guile::Aspect< T >

Aspect that extends Guile-unaware classes and provides a pointer to the corresponding wrapper object.

Date
2020-04-03

Wrapper/aspect technique is described in . In our implementation it boils down to the following two rules. When C++ object is destroyed, a pointer to this object in the corresponding wrapper object is cleared. When Guile object is destroyed by garbage collector and its finilizer is called, the corresponding C++ object is deleted.

Definition at line 16 of file wrapper.hh.