The Vish Visualization Shell 0.3
Vish
Public Member Functions | Related Symbols | List of all members
Wizt::ValueSet Class Reference

A set of values. More...

#include <ocean/plankton/ValueSet.hpp>

Inheritance diagram for Wizt::ValueSet:
MemCore::ReferenceBase< ValueSet >

Public Member Functions

void addValue (const MemCore::WeakPtr< VValueBase > &V)
 Add a value to this set.
 
ValueSetoperator<<= (const MemCore::WeakPtr< VValueBase > &V)
 Operator overload function to add values to this set, can be written consecutively:
 
 ValueSet ()
 Empty default constructor.
 
 ValueSet (const MemCore::WeakPtr< VValueBase > &V)
 Construct a value set with a single value.
 
const string & ValueState () const
 Return the current state of all values stored here.
 
 ~ValueSet ()
 Destructor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< ValueSet >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< ValueSet, ValueSet > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (ValueSet *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 

Related Symbols

(Note that these are not member symbols.)

ValueSetPair operator& (const RefPtr< ValueSet > &VS, const RefPtr< ValuePool > &VP)
 The combination of a ValueSet pointer and a ValuePool forms a pair that can be assigned slots.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< ValueSet >
using reference_domain_t = ValueSet
 The type of the base class.
 
using SelfPtr_t = WeakPtr< ValueSet, ValueSet >
 Type for a pointer to this object itself.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< ValueSet >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

A set of values.

Typical usage synopsis:

class MyObject : VObject
{
TypedSlot<int> MyInteger;
void proc(VRenderContext&Context) const
{
// Add the current value of the slot MyInteger to the given ValueSet
*V <<= MyInteger(Context);
...
}
};
A set of variable names, with indices associated to each type.
Definition Context.hpp:18
A reference counting pointer class which keeps objects alive as long as strong pointers to these obje...
Definition RefPtr.hpp:405
An input slot for VObjects, bound to a specific type.
Definition TypedSlot.hpp:57
Generic base class for all VObjects.
Definition VObject.hpp:186
Base class for objects that may display something.
Definition VRenderContext.hpp:77
A set of values.
Definition ValueSet.hpp:33

The ValueSet takes a VValueBase as a reference to a value and stores its current state. While the content of the VValueBase itself may change, the ValueSet knows about its former value and allows to compare it.

Constructor & Destructor Documentation

◆ ValueSet()

Wizt::ValueSet::ValueSet ( const MemCore::WeakPtr< VValueBase > &  V)
inline

Construct a value set with a single value.

RefPtr<ValueSet> V = new ValueSet( MyInteger(Context) );
ValueSet()
Empty default constructor.
Definition ValueSet.cpp:8

Member Function Documentation

◆ operator<<=()

ValueSet & Wizt::ValueSet::operator<<= ( const MemCore::WeakPtr< VValueBase > &  V)
inline

Operator overload function to add values to this set, can be written consecutively:

// Add the current value of the slots MyInteger and MySecondInteger to the given ValueSet
*V <<= MyInteger(Context) <<= MySecondInteger(Context)

Friends And Related Symbol Documentation

◆ operator&()

ValueSetPair operator& ( const RefPtr< ValueSet > &  VS,
const RefPtr< ValuePool > &  VP 
)
related

The combination of a ValueSet pointer and a ValuePool forms a pair that can be assigned slots.

RefPtr<ValueSet> Values = new ValueSet();
// Need new textures when the slice location or orientation changes.
Values & Context += SliceLocation, OrientationSlot, Shift;

, ValueSetPair, VSlot