mbsim
4.0.0
MBSim Kernel
|
#include <objectfactory_part.h>
Public Member Functions | |
virtual fmatvec::Atom * | operator() () const =0 |
Implement this function to allocate a new object. More... | |
virtual bool | isEqual (const AllocateBase &other) const =0 |
Base wrapper class to allocate an object derived from fmatvec::Atom. We can use just a function pointer, fmatvec::Atom* (*allocateFct)(), for the same purpose. But for other more complex allocator functions (e.g. Python objects using swig directors) this is not flexible enought since we need to provide a custom compare function (isEqual).
|
pure virtual |
Implement this function to compare whether this class and the instance other allocate the same object type when calling operator(). (we use isEqual here instead of operator== to avoid problems with some swig versions)
Implemented in MBSim::Allocate< CreateType >.
|
pure virtual |
Implement this function to allocate a new object.
Implemented in MBSim::Allocate< CreateType >.