The Vish Visualization Shell 0.3
Vish
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
Wizt::VSaveable Class Reference

Base class for objects that can be saved to some URL. More...

#include <ocean/plankton/VSaver.hpp>

Inheritance diagram for Wizt::VSaveable:
Wizt::VObject FloatsToPoint2D Wizt::CatchStatus Wizt::Coral Wizt::HTTPServer Wizt::MetaViewer Wizt::MovieRecorder Wizt::RemoteVish Wizt::RenderAble Wizt::VChartSelector Wizt::VProxyObject Wizt::VScene Wizt::VStreamObject Wizt::Viewer

Classes

struct  SaveIterator
 Accompanying iterator class. More...
 

Public Types

using save_iterator = std::function< bool(const string &s, VishSaver &VS)>
 Callback function to iterate over object savers.
 

Public Member Functions

void addSaver (const string &, const RefPtr< VishSaver > &)
 Add a save object that is associated with the certain text.
 
template<class AppClass >
void addSavers (AppClass &A)
 To add external savers a derived class call.
 
bool autosave () const
 Save object using the last used saver.
 
RefPtr< VishSavergetMostRecentSaver () const
 Get the last saver that had been used for this object.
 
size_t getNumberOfSavers () const
 Get the number of savers.
 
RefPtr< VishSavergetSaver (const string &) const
 Retrieve a saver functor that is associated to the certain text.
 
RefPtr< VishSavergetSaverByExt (const string &ext) const
 Retrieve a saver functor for the given file extension.
 
int iterate_savers (const save_iterator &si) const
 Iterate over all savers associated with this object.
 
 VSaveable ()
 Constructor, does nothing.
 
 ~VSaveable ()
 Destructor, does nothing but automatic cleanup.
 

Static Public Member Functions

static VSaveableGlobalState ()
 A global saveable object that is supposed to take care of the entire VISH state.
 

Detailed Description

Base class for objects that can be saved to some URL.

This base class is basically a map of strings to VishSaver objects. This string list can be queried using the SaveIterator to find an appropriate saver functor, if there are many.

Member Function Documentation

◆ addSavers()

template<class AppClass >
void Wizt::VSaveable::addSavers ( AppClass &  A)
inline

To add external savers a derived class call.

addSavers( *this );
void addSavers(AppClass &A)
To add external savers a derived class call.
Definition VSaver.hpp:167

◆ getMostRecentSaver()

RefPtr< VishSaver > Wizt::VSaveable::getMostRecentSaver ( ) const

Get the last saver that had been used for this object.

It is evidently a null pointer if it has never been saved yet.

References MemCore::Ageable::InfinitelyOld(), and MemCore::Ageable::update().

◆ GlobalState()

VSaveable & Wizt::VSaveable::GlobalState ( )
static

A global saveable object that is supposed to take care of the entire VISH state.

Runtime plugins may implement specific functionalities.