Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Fiber::BundlePtr Class Reference

Convenience class that implements a pointer to a Bundle object but adds some useful member funtions that lets the pointer resemble the same properties as the Bundle object itself. More...

#include <Bundle.hpp>

Inheritance diagram for Fiber::BundlePtr:
Eagle::StrongPtr< Object, ObjectBase > MemCore::WeakPtr< Object, ObjectBase > MemCore::DynPtr< Object, ObjectBase >

Public Member Functions

 BundlePtr ()
 Constructor, creates null ptr.
 BundlePtr (const BundlePtr &)=default
 Copy Constructor.
 BundlePtr (const RefPtr< Bundle > &)
 Copy constructor, Bundle object is shared.
 BundlePtr (Bundle *)
 ~BundlePtr ()
 Destructor, removes Bundle if this is the only reference.
BundlePtroperator= (const BundlePtr &)=default
 Assignment.
Bundlecreate ()
 Create Bundle object or return a valid existing one.
Bundleoperator* ()
 Dereferencing operator - it will always yield a valid object, if the bundle pointer was not yet initialized, it will be now.
Bundleoperator* () const
Sliceoperator[] (double time)
 Convenient slice access function.
SlicePtr operator() (double &time)
 Request a Slice without creating any data.
int save (const string &url, const RefPtr< LoaderProgress > &SaveProgress=nullptr, const RefPtrStorageTransformations &ST=nullptr)
int saveGrids (const string &url, const RefPtr< MemCore::StringList > &SaveableGridNames, const RefPtr< LoaderProgress > &SaveProgress=nullptr, const RefPtrStorageTransformations &ST=nullptr)
 Save a subset of Grid from this bundle only.
bool load (const string &url, const RefPtr< LoaderProgress > &Progress=nullptr)
bool load (const list< string > &urls, const RefPtr< LoaderProgress > &Progress=nullptr)
Public Member Functions inherited from Eagle::StrongPtr< Object, ObjectBase >
StrongPtrassignStrong (const DynPtr_t &other)
StrongPtrassignStrong (const ReferenceBase< ObjectBase_t > *Obj)
StrongPtrassignStrong (const std::nullptr_t &)
auto operator() (Arguments...parameters) const -> decltype((*this->getPtrValue())(parameters...))
refvalue_toperator* () const
pointer_t operator-> () const
StrongPtroperator= (const DynPtr_t &other)
StrongPtroperator= (const ReferenceBase< ObjectBase_t > *Obj)
StrongPtroperator= (const std::initializer_list< StrongPtr > &other)
StrongPtroperator= (const std::nullptr_t &)
StrongPtroperator= (const StrongPtr &other)
auto operator[] (const IndexType &I) const -> decltype((*this->getPtrValue())[I])
 StrongPtr (const ReferenceBase< ObjectBase_t > *Obj)
 StrongPtr (const ReferenceBase< ObjectBase_t > *Obj, const NotNullPtr &)
 StrongPtr (const std::nullptr_t &)
 StrongPtr (const StrongPtr< ChildObject, ObjectBase > &Other)
 StrongPtr (const StrongPtr< Object, ObjectBase > &Other)
 StrongPtr (const WeakPtr< ChildObject, ObjectBase_t > &Other)
Public Member Functions inherited from MemCore::WeakPtr< Object, ObjectBase >
 WeakPtr (const std::nullptr_t &)
 WeakPtr (const ReferenceBase< ObjectBase > *Obj)
 WeakPtr (const ReferenceBase< ObjectBase > *Obj, const NotNullPtr &)
 WeakPtr (const WeakPtr< AnyObject, ObjectBase > &Other)
 WeakPtr (const WeakPtr &Other)
pointer_t getPtrValue () const
pointer_t operator-> () const
refvalue_toperator* () const
size_t operator~ () const
WeakPtrassignWeak (const WeakPtr &other)
WeakPtroperator= (const WeakPtr &other)
Public Member Functions inherited from MemCore::DynPtr< Object, ObjectBase >
const DynPtrgetDynPtr () const noexcept
const type_info & getType () const noexcept
bool isAssignable (const DynPtr< ObjectBase, ObjectBase > &Other) const noexcept
 operator void * () const noexcept
bool operator! () const noexcept
void speak (const char *s, const char *prefix="") const noexcept
void Speak (const char *s, const char *prefix="") const

Additional Inherited Members

Public Types inherited from Eagle::StrongPtr< Object, ObjectBase >
typedef WeakPtr< Object, ObjectBase >::ObjectBase_t ObjectBase_t
Public Types inherited from MemCore::WeakPtr< Object, ObjectBase >
typedef Object object_t
typedef ObjectBase ObjectBase_t
typedef RefPtrTypeTrait< Object, ObjectBase >::ReferencePointerType pointer_t
typedef RefPtrTypeTrait< Object, ObjectBase >::ReferenceValueType refvalue_t
Public Types inherited from MemCore::DynPtr< Object, ObjectBase >
typedef Object object_t
Static Public Member Functions inherited from MemCore::DynPtr< Object, ObjectBase >
static const DynPtrgetNullPtr () noexcept
Protected Member Functions inherited from MemCore::WeakPtr< Object, ObjectBase >
 WeakPtr (Object *that, const SelfInitialize &)
Protected Member Functions inherited from MemCore::DynPtr< Object, ObjectBase >
 DynPtr (const DynPtr< AnyObject, ObjectBase > &Other) noexcept
 DynPtr (const std::nullptr_t &) noexcept

Detailed Description

Convenience class that implements a pointer to a Bundle object but adds some useful member funtions that lets the pointer resemble the same properties as the Bundle object itself.

Examples
EvolutionSurface.cpp, HelicalLines.cpp, ModifyingPointCloudRange.cpp, XF_LineSetFragmented.cpp, XF_LineSetHierarchical.cpp, XF_LineSetHierarchicalRegularized.cpp, trimesh.cpp, and uniform_scalar.cpp.

Member Function Documentation

◆ operator()()

SlicePtr Fiber::BundlePtr::operator() ( double & time)
inline

Request a Slice without creating any data.

Note that this request might \i load the Slice.

◆ operator[]()

Slice & Fiber::BundlePtr::operator[] ( double time)
inline

Convenient slice access function.

This function *may* create an empty Bundle if no such exists yet. Therefore it's not a constant member function.

◆ save()

int Fiber::BundlePtr::save ( const string & url,
const RefPtr< LoaderProgress > & SaveProgress = nullptr,
const RefPtrStorageTransformations & ST = nullptr )
RefPtr<Fiber::FBXMLSaver> BSaver = Bndl->getInterface(typeid(Fiber::XML) );
if (BSaver)
BSaver->save(*Bndl, "-");
StrongPtr< Object, ObjectBase > RefPtr
Definition XML/init.hpp:20
Examples
XF_LineSetFragmented.cpp, XF_LineSetHierarchical.cpp, and XF_LineSetHierarchicalRegularized.cpp.

Referenced by main().