The Vish Visualization Shell 0.3
Vish
Classes | Public Member Functions | Public Attributes | List of all members
Wizt::VContext Struct Reference

A Context is always local and unique for each call. More...

#include <ocean/plankton/VContext.hpp>

Inheritance diagram for Wizt::VContext:
Wizt::VRenderContextBasin Wizt::VRenderContext Wizt::VGLRenderContext Wizt::WebGLRenderContext

Classes

struct  Addendum
 Container for additional data specific for this Context. More...
 
struct  RealTime
 
struct  TimeInterface
 

Public Member Functions

 operator const RefPtr< ValuePool > & () const
 A VContext may be implicitely converted into a reference pointer to a ValuePool.
 
template<typename... SlotList>
auto operator() (SlotList... t) const -> decltype(evaluateSlots(GhostValues, t...))
 Evaluate a set of input slots at once, return the values as a std::tuple<> according to the slot values.
 
string PoolName () const
 Return the name of the associated value pool.
 
void setTime ()
 set the time according to the current system time
 
 VContext (const RefPtr< Addendum > &CAddendum=NullPtr())
 Constructor.
 
 VContext (const RefPtr< ValuePool > &myValuePool, const RefPtr< Addendum > &CAddendum=NullPtr())
 Constructor with ValuePool.
 
 VContext (const RefPtr< ValuePoolProvider > &myValuePoolProvider)
 Context constructor, taking optional parameter ValuePoolProvider to setup the GhostValues in this context.
 
virtual ~VContext ()
 Destructor.
 

Public Attributes

RefPtr< AddendumContextAddendum
 An optional addendum to this context.
 
RefPtr< ValuePoolGhostValues
 Eventually, some variables of an input are contained in a value pool; if so, then they are semantically local to a certain context (or a group of context's).
 
double precision
 The precision parameter tells with what precision a certain action is to be executed.
 

Detailed Description

A Context is always local and unique for each call.

However, it may refer to a ValuePool which is persistent through many VContext objects, or which may also be shared among various VContext objects.

Note
The Context is a mutex that can be used in a multithreaded environment. This is most conveniently used via the (exception-safe) synchronized statement:
double value = 0;
synchronized( Context )
{
mySlot << Context >> value;
}
A set of variable names, with indices associated to each type.
Definition Context.hpp:18

Constructor & Destructor Documentation

◆ VContext()

Wizt::VContext::VContext ( const RefPtr< ValuePoolProvider > &  myValuePoolProvider)

Context constructor, taking optional parameter ValuePoolProvider to setup the GhostValues in this context.

The current value of the ValuePool will be used. Note that a strong pointer to the ValuePool is stored here, such that the ValuePool is kept alive at least as long as the VContext is alive.

References setTime().

Member Function Documentation

◆ operator const RefPtr< ValuePool > &()

Wizt::VContext::operator const RefPtr< ValuePool > & ( ) const
inline

A VContext may be implicitely converted into a reference pointer to a ValuePool.

This simplifies various calls.