The Vish Visualization Shell 0.3
Vish
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | Related Symbols | List of all members
Wizt::TypedSlot< T > Class Template Reference

An input slot for VObjects, bound to a specific type. More...

#include <ocean/plankton/TypedSlot.hpp>

Inheritance diagram for Wizt::TypedSlot< T >:
MemCore::StrongPtr< Object, ObjectBase > MemCore::WeakPtr< Object, ObjectBase > MemCore::DynPtr< Object, ObjectBase > Vish::Input< T >

Classes

class  SlotCreator
 The associated Slot Creator. More...
 

Public Types

typedef std::pair< const TypedSlot, const RefPtr< ValuePool > > SlotContext
 A typed Slot context.
 
typedef T value_type
 The type on which this slot operates.
 
- Public Types inherited from MemCore::StrongPtr< Object, ObjectBase >
typedef WeakPtr< Object, ObjectBase >::ObjectBase_t ObjectBase_t
 Exporting the base class of the reference counted objects.
 
- Public Types inherited from MemCore::WeakPtr< Object, ObjectBase >
typedef Object object_t
 Exporting the type of the derived class.
 
typedef ObjectBase ObjectBase_t
 Exporting the type of the base class.
 
typedef RefPtrTypeTrait< Object, ObjectBase >::ReferencePointerType pointer_t
 The result type of the pointer operator, may be changed with the RefPtrTypeTrait<> class.
 
typedef RefPtrTypeTrait< Object, ObjectBase >::ReferenceValueType refvalue_t
 The result of the dereferencing operator, may be changed with the RefPtrTypeTrait<> class.
 
- Public Types inherited from MemCore::DynPtr< Object, ObjectBase >
typedef Object object_t
 Type of the associated object.
 

Public Member Functions

void activate () const
 Activate this slot.
 
template<class VObjectClass , void(VObjectClass::*)(const T &, const ValuePoolPtr &Context) const callback>
RefPtr< ValueNotifieraddNotifier (VObjectClass *That)
 Install a notifier callback function that is a member function of the provided class.
 
template<class VObjectClass , void(VObjectClass::*)(const T &, const ValuePoolPtr &Context) const callback, class VObjectClassPtr >
RefPtr< ValueNotifieraddNotifier (VObjectClass *That)
 Similar to the former function addNotifier, but allows to explicitly specify the type of the pointer to the owning object.
 
template<class VObjectClass , void(VObjectClass::*)(const T &, const ValuePoolPtr &Context) callback>
RefPtr< ValueNotifieraddNotifier (VObjectClass *That)
 A mutable version of the addNotifier() function with a callback function that may modify the owning object.
 
template<class VObjectClass , void(VObjectClass::*)(const T &, const ValuePoolPtr &Context) callback, class VObjectClassPtr >
RefPtr< ValueNotifieraddNotifier (VObjectClass *That)
 A version of a mutable addNotifier() with a callback function that may modify the owning object and allows to specify the pointer type.
 
template<class VObjectClass , class VObjectClassPtr >
RefPtr< ValueNotifieraddNotifier (VObjectClass *That, void(VObjectClass::*callback)(const T &, const ValuePoolPtr &Context) const)
 Another version of the addNotifier function where the callback function is specified at runtime as function argument, instead of compile-time as template argument.
 
template<class VObjectClass >
RefPtr< ValueNotifieraddNotifier (VObjectClass *That, void(VObjectClass::*callback)(const T &, const ValuePoolPtr &Context) const)
 A version of the addNotifier function where the callback function is specified at runtime as function argument, instead of compile-time as template argument.
 
template<class VObjectClass , class VObjectClassPtr >
RefPtr< ValueNotifieraddNotifier (VObjectClass *That, void(VObjectClass::*callback)(const T &, const ValuePoolPtr &Context))
 A mutable addNotifier() function that allows to specify the callback function at runtime instead of compile-time and explicit pointer storage type.
 
template<class VObjectClass >
RefPtr< ValueNotifieraddNotifier (VObjectClass *That, void(VObjectClass::*callback)(const T &, const ValuePoolPtr &Context))
 A mutable addNotifier() function that allows to specify the callback function at runtime instead of compile-time.
 
const Ageableage (const RefPtr< ValuePool > &Context) const
 Return the age of this Slot relative to the given Context.
 
void deactivate () const
 Deactivate this slot.
 
RefPtr< VValueBasegetProperty (const string &s) const
 Get a certain property of the parameter associated with this slot.
 
template<class Type >
bool getProperty (const string &s, Type &theValue) const
 Retrieve the value of a certain property of the parameter associated with this slot, if it is compatible to the specified type.
 
WeakVObjectPtr getSlotOwner () const
 Return the associated slot owning object, which is the one where this slot resides.
 
RefPtr< VManagedObjectgetSource () const
 Return the associated source object, which is related to the referenced parameter.
 
RefPtr< VValueBasegetValue (const RefPtr< ValuePool > &VP) const
 Retrieve the untyped value of this slot.
 
const T & getValue (const RefPtr< ValuePool > &VP, const T &DefaultValue) const
 Get the value of a typed slot, using a default value if anything went wrong:
 
const T & getValue (const T &DefaultValue, const RefPtr< ValuePool > &VP) const
 An alternative version of the getValue() function with reversed order of arguments such that you do not need to remember the order of function arguments.
 
RefPtr< VTypedValueBase< T > > getValueBT (const RefPtr< ValuePool > &VP) const
 A version of the getValue() function that yields a fitting VTypedValueBase<T> directly.
 
bool isActive () const
 Check whether this slot is active.
 
bool isInactive () const
 Check whether this slot is inactive.
 
bool isLocal () const
 Check whether this slot refers to a local setting.
 
RefPtr< VValueBaseoperator() (const RefPtr< ValuePool > &VP) const
 A shortcut version of member function getValue():
 
const T & operator() (const RefPtr< ValuePool > &VP, const T &DefaultValue) const
 An alternative version of the operator function with reversed order of arguments, for the coder's convenience.
 
const T & operator() (const T &DefaultValue, const RefPtr< ValuePool > &VP) const
 An operator version of the getValue() member function, for convenience:
 
const string & operator/= (const string &s) const
 
SlotContext operator<< (const RefPtr< ValuePool > &VP) const
 Create a SlotContext from a given ValuePool, which is a proxy for the pair of a Slot and a Context, to be used for assigning or reading values.
 
TypedSlotoperator= (const TypedSlot &TS)
 Assignment constructor - does NOT change the default value!
 
const T & operator[] (const RefPtr< ValuePool > &VP) const
 Return the given value of this slot, possibly the default value.
 
void setActive (bool IsActive=true) const
 Set activity flag.
 
void setHelptext (const string &helptext) const
 Set a help text for user information about this slot.
 
template<class Type >
bool setProperty (const string &theName, const Type &theValue) const
 Set a property of the parameter that is associated with this slot.
 
void setRelevance (int rel) const
 Set the relevance of the associated parameter This should only be done if the parameter is exclusively used here, not once it has been shared.
 
 TypedSlot ()
 Default constructor to create empty slot references that are filled in at a later time.
 
 TypedSlot (const std::string &theSlotName, const T &theDefaultValue, int myInitialExpertLevel=1, RefPtr< VCreationPreferences > theVP=nullptr)
 Object-independent initialization with future slot name and default value.
 
 TypedSlot (const TypedSlot &TS)
 Copy constructor.
 
template<int I>
 TypedSlot (const VSlot::Empty< I > &, VSlotContainer *that, const string &name, const RefPtr< VCreationPreferences > &VP, int prior)
 Construct a typed slot with Creation Preferences, but no initialization of the value.
 
template<int I>
 TypedSlot (const VSlot::Empty< I > &, VSlotContainer *that, const string &name, int prior=0)
 Special constructor that does not initialize the value of this input slot.
 
 TypedSlot (const WeakVObjectPtr &that, const string &name, const T &initialValue, int expertLevel=0, bool overwriteExistingSlot=true)
 Constructing a typed slot.
 
 TypedSlot (VSlotContainer *that, const string &name, const T &initialValue, const RefPtr< VCreationPreferences > &VP, int ExpertLevel=0, bool overwriteExistingSlot=true)
 Creation of a typed slot, constructor with creation preferences.
 
 TypedSlot (VSlotContainer *that, const string &name, const T &initialValue, int expertLevel=0)
 Constructing a typed slot.
 
 TypedSlot (VSlotContainer *that, const VSlot::Empty< 0 > &, const string &name, int prior=0)
 Creates a typed slot with no parameter attached yet.
 
 ~TypedSlot ()
 Destructor.
 
- Public Member Functions inherited from MemCore::StrongPtr< Object, ObjectBase >
StrongPtrassignStrong (const DynPtr_t &other)
 assign a strong pointer from a weak pointer
 
StrongPtrassignStrong (const ReferenceBase< ObjectBase_t > *Obj)
 assign a strong pointer from a native pointer
 
StrongPtrassignStrong (const std::nullptr_t &)
 Assign nullptr to a strong pointer, which will remove the referenced object if its counter reaches zero, but the pointer will remain a valid weak pointer with sustained hash value (the referer will still be around).
 
template<typename... Arguments>
auto operator() (Arguments...parameters) const -> decltype((*this->getPtrValue())(parameters...))
 Function call operator forwarding.
 
refvalue_t & operator* () const
 The dereferencing *-operator.
 
pointer_t operator-> () const
 The pointer operator.
 
StrongPtroperator= (const DynPtr_t &other)
 Assignment operator, same as assignStrong()
 
StrongPtroperator= (const ReferenceBase< ObjectBase_t > *Obj)
 Assignment from object base class pointer.
 
StrongPtroperator= (const std::initializer_list< StrongPtr > &other)
 Syntactic sugar: Allows assignment with {} to create a nullptr.
 
StrongPtroperator= (const std::nullptr_t &)
 Assignment operator with nullptr, invalidate.
 
StrongPtroperator= (const StrongPtr &other)
 Assignment operator, same as assignStrong()
 
template<class IndexType >
auto operator[] (const IndexType &I) const -> decltype((*this->getPtrValue())[I])
 Index operator forwarding.
 
 StrongPtr ()
 Default constructor (makes a NULL pointer)
 
 StrongPtr (const ReferenceBase< ObjectBase_t > *Obj)
 Strong pointer from reference base of object, eg. via new operator.
 
 StrongPtr (const ReferenceBase< ObjectBase_t > *Obj, const NotNullPtr &)
 Strong pointer from reference base of object, eg. via new operator.
 
 StrongPtr (const std::nullptr_t &)
 Explicitely construct a nullptr pointer.
 
template<class ChildObject >
 StrongPtr (const StrongPtr< ChildObject, ObjectBase > &Other)
 Reference pointer with dynamic type identification.
 
 StrongPtr (const StrongPtr< Object, ObjectBase > &Other)
 Copy constructor.
 
template<class ChildObject >
 StrongPtr (const WeakPtr< ChildObject, ObjectBase_t > &Other)
 Reference pointer with dynamic type identification.
 
 ~StrongPtr ()
 Destructor, the last one cleans up and destructs the object itself.
 
- Public Member Functions inherited from MemCore::WeakPtr< Object, ObjectBase >
pointer_t getPtrValue () const
 The pointer value, checked for null.
 
pointer_t operator-> () const
 The pointer operator.
 
refvalue_toperator* () const
 The dereferencing *-operator.
 
size_t operator~ () const
 Convenience operator to easily retrieve the object count ID of the referenced object, a unique number for each instance.
 
 WeakPtr ()
 Default constructor, makes a NULL pointer.
 
 WeakPtr (const std::nullptr_t &)
 Explicitely construct NULL pointer.
 
 WeakPtr (const ReferenceBase< ObjectBase > *Obj)
 Weak pointer from reference base of object.
 
 WeakPtr (const ReferenceBase< ObjectBase > *Obj, const NotNullPtr &)
 Weak pointer from reference base of object which must not be null.
 
template<class AnyObject >
 WeakPtr (const WeakPtr< AnyObject, ObjectBase > &Other)
 Weak pointer from pointer to another class.
 
 WeakPtr (const WeakPtr &Other)
 Copy constructor.
 
 ~WeakPtr ()
 Default destructor, removes weak references to the object, the last one cleans up the referrer proxy object.
 
WeakPtrassignWeak (const WeakPtr &other)
 Assign a weak pointer (explicit function call, same as assignment operator for weak pointers)
 
WeakPtroperator= (const WeakPtr &other)
 Assignment operator (same as assignWeak() )
 
- Public Member Functions inherited from MemCore::DynPtr< Object, ObjectBase >
const DynPtrgetDynPtr () const noexcept
 Convenience type cast to dynamic pointer class.
 
const type_info & getType () const noexcept
 Return type info of associated object, typeid(NullPtr) or typeid(void) if none.
 
bool isAssignable (const DynPtr< ObjectBase, ObjectBase > &Other) const noexcept
 Check whether a given pointer to a base class may be assigned to a pointer of the derived class.
 
 operator void * () const noexcept
 Check if the pointer is valid.
 
bool operator! () const noexcept
 Check if the pointer is invalid.
 
void speak (const char *s, const char *prefix="") const noexcept
 Print some debug messages to the console.
 

Static Public Member Functions

static TypedSlot type_cast (const RefPtr< VSlot > &VP)
 Cast an untyped Slot to a typed one, which, of course, will only succeed if the types are compatible.
 
- Static Public Member Functions inherited from MemCore::WeakPtr< Object, ObjectBase >
- Static Public Member Functions inherited from MemCore::DynPtr< Object, ObjectBase >
static const DynPtrgetNullPtr () noexcept
 Associated static NullPtr - avoids creation of a temporary object when a reference is needed.
 

Friends

const ValueSetPairoperator+= (const ValueSetPair &VSP, const TypedSlot &VS)
 
const ValueSetPairoperator, (const ValueSetPair &VSP, const TypedSlot &VS)
 
bool operator<< (const SlotContext &SC, const T &Variable)
 Assign a parameter's value within slot context, returns true or false, if this was possible or not.
 
VSlotContaineroperator<< (VSlotContainer *that, TypedSlot &TS)
 Attach a partially initialized TypeSlot at a VObject.
 
bool operator<<= (const SlotContext &SC, const T &Variable)
 Assign a parameter's value within slot context IF it has changed.
 
bool operator>> (const SlotContext &SC, T &Variable)
 Assign a variable from a slot context, returns true or false, if this was possible or not.
 

Related Symbols

(Note that these are not member symbols.)

template<class T >
bool adjustRange (TypedSlot< T >theSlot, const T &minval, const T &maxval)
 Set the minimum/maximum parameters of a slot.
 

Additional Inherited Members

- Protected Member Functions inherited from MemCore::WeakPtr< Object, ObjectBase >
 WeakPtr (Object *that, const SelfInitialize &)
 Internal constructor used when initializing an object with its own self-reference.
 
- Protected Member Functions inherited from MemCore::DynPtr< Object, ObjectBase >
template<class AnyObject >
 DynPtr (const DynPtr< AnyObject, ObjectBase > &Other) noexcept
 Implicit type conversion within the same class hierarchy Any pointer.
 
 DynPtr (const std::nullptr_t &) noexcept
 Assign from nullptr.
 

Detailed Description

template<class T>
class Wizt::TypedSlot< T >

An input slot for VObjects, bound to a specific type.

An input slot is a reference to a VParameter, that is contained within an VObject. The typical usage is

class MyObject : public VObject
{
TypedSlot<int> MyInteger;
MyObject()
: MyInteger(this, "myvalue", 42)
{}
};
An input slot for VObjects, bound to a specific type.
Definition TypedSlot.hpp:57
Generic base class for all VObjects.
Definition VObject.hpp:186

Basically a TypedSlot is a convenience class wrapper for using VObject::Slot, which is for untyped slots.

Examples
AnemoneBoundingVolume.cpp, InteractivePoint.cpp, and SeagrassBoundingVolume.cpp.

Constructor & Destructor Documentation

◆ TypedSlot() [1/6]

template<class T >
Wizt::TypedSlot< T >::TypedSlot ( const std::string &  theSlotName,
const T &  theDefaultValue,
int  myInitialExpertLevel = 1,
RefPtr< VCreationPreferences theVP = nullptr 
)
inline

Object-independent initialization with future slot name and default value.

Allows for direct initialization in the object definition:

TypedSlot<int> myIntegerInput = { "integerinput", 42 };

Slots that are initialized this way don't need to be specified in the construction list but must be activated at the object where they belong, in particular the constructor:

this << myIntegerInput;

◆ TypedSlot() [2/6]

template<class T >
Wizt::TypedSlot< T >::TypedSlot ( VSlotContainer that,
const string &  name,
const T &  initialValue,
int  expertLevel = 0 
)
inline

Constructing a typed slot.

Parameters
thatThe VObject to which this slot is bound.
ELthe Expert level of this slot, which might be used for a GUI.
initialValueThe intial value of this slot's parameter.

References Wizt::VSlotGlobals::addParameter(), MemCore::StrongPtr< Object, ObjectBase >::assignStrong(), Wizt::TypedSlot< T >::getSlotOwner(), and MemCore::DynPtr< Object, ObjectBase >::Speak().

◆ TypedSlot() [3/6]

template<class T >
Wizt::TypedSlot< T >::TypedSlot ( const WeakVObjectPtr that,
const string &  name,
const T &  initialValue,
int  expertLevel = 0,
bool  overwriteExistingSlot = true 
)
inline

Constructing a typed slot.

Parameters
thatThe VObject to which this slot is bound.
ELthe Expert level of this slot, which might be used for a GUI.
initialValueThe intial value of this slot's parameter.

References Wizt::VSlotGlobals::addParameter(), MemCore::StrongPtr< Object, ObjectBase >::assignStrong(), and Wizt::TypedSlot< T >::getSlotOwner().

◆ TypedSlot() [4/6]

template<class T >
template<int I>
Wizt::TypedSlot< T >::TypedSlot ( const VSlot::Empty< I > &  ,
VSlotContainer that,
const string &  name,
const RefPtr< VCreationPreferences > &  VP,
int  prior 
)
inline

Construct a typed slot with Creation Preferences, but no initialization of the value.

Uses non-standard constructor for VValueParameter<T>, thus this constructor is only available for types where a specialization of VValueParameter<T>(string, RefPtr<VCreationPrefences>) exists.

Note
Requires template VValueParameter<T>::VValueParameter(string, const RefPtr<VCreationPreferences>&) to be specialized!!

References Wizt::VSlotGlobals::addSlot(), MemCore::StrongPtr< Object, ObjectBase >::assignStrong(), and Wizt::TypedSlot< T >::getSlotOwner().

◆ TypedSlot() [5/6]

template<class T >
template<int I>
Wizt::TypedSlot< T >::TypedSlot ( const VSlot::Empty< I > &  ,
VSlotContainer that,
const string &  name,
int  prior = 0 
)
inline

Special constructor that does not initialize the value of this input slot.

Rarely to be used, only for specific cases where initialization of a slot's type is non-trivial.

Uses non-standard constructor for VValueParameter<T>, thus this constructor is only available for types where a specialization of VValueParameter<T>() exists.

Note
Requires template VValueParameter<T>::VValueParameter() to be specialized!!

References Wizt::VSlotGlobals::addSlot(), MemCore::StrongPtr< Object, ObjectBase >::assignStrong(), and Wizt::TypedSlot< T >::getSlotOwner().

◆ TypedSlot() [6/6]

template<class T >
Wizt::TypedSlot< T >::TypedSlot ( VSlotContainer that,
const string &  name,
const T &  initialValue,
const RefPtr< VCreationPreferences > &  VP,
int  ExpertLevel = 0,
bool  overwriteExistingSlot = true 
)
inline

Creation of a typed slot, constructor with creation preferences.

Parameters
thatThe object to which this parameter will be attached.
nameThe name under which this parameter will be accessed from within this object. It will be modified via VObject::CreateParameterName().
initialValueThe initial value of this slot's parameter.

References Wizt::VSlotGlobals::addParameter(), MemCore::StrongPtr< Object, ObjectBase >::assignStrong(), and Wizt::TypedSlot< T >::getSlotOwner().

◆ ~TypedSlot()

template<class T >
Wizt::TypedSlot< T >::~TypedSlot ( )
inline

Destructor.

It contains meaningless code to access the static SlotCreator instance such that SlotCreators are instantiated and added to the SlotCreator registry. This meaningless code is a simple pointer assignment and will slow down the destructor by about one or two CPU cycles.

Member Function Documentation

◆ getProperty()

template<class T >
template<class Type >
bool Wizt::TypedSlot< T >::getProperty ( const string &  s,
Type &  theValue 
) const
inline

Retrieve the value of a certain property of the parameter associated with this slot, if it is compatible to the specified type.

Returns
false If there type is incompatible, or there is no such property at all.

References Wizt::TypedSlot< T >::getProperty().

◆ getValue() [1/3]

template<class T >
RefPtr< VValueBase > Wizt::TypedSlot< T >::getValue ( const RefPtr< ValuePool > &  VP) const
inline

Retrieve the untyped value of this slot.

It needs to be cased to a VTypedValueBase<T> (or a base class thereof) to read the actual value as in:

RefPtr<TypedSlot<int>> mySlot = ... ;
if (RefPtr<VTypedValueBase<int> > myValue = mySlot->getValue(Context))
{
int Value = 42;
if (myValue->getValue( Value ))
{
std::cout << "Got the value " << Value;
}
}
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
Base class for values with type.
Definition VValue.hpp:47

Note that using the << >> operator syntax is recommended, see bool operator<<(const SlotContext&SC, const T&Variable);

Referenced by Wizt::TypedSlot< T >::getValue(), Wizt::TypedSlot< T >::operator()(), Wizt::TypedSlot< T >::operator()(), Wizt::TypedSlot< T >::operator()(), and Wizt::TypedSlot< T >::operator[]().

◆ getValue() [2/3]

template<class T >
const T & Wizt::TypedSlot< T >::getValue ( const RefPtr< ValuePool > &  VP,
const T &  DefaultValue 
) const
inline

Get the value of a typed slot, using a default value if anything went wrong:

RefPtr<TypedSlot<int>> mySlot = ... ;
int DefaultValue = 42;
const int&mySlotValue = mySlot->getValue( Context, DefaultValue );
std::cout << "Got the value " << mySlotValue;

Note that using the << >> operator syntax is recommended, see bool operator<<(const SlotContext&SC, const T&Variable);

◆ getValue() [3/3]

template<class T >
const T & Wizt::TypedSlot< T >::getValue ( const T &  DefaultValue,
const RefPtr< ValuePool > &  VP 
) const
inline

An alternative version of the getValue() function with reversed order of arguments such that you do not need to remember the order of function arguments.

Both version will work alike. This function is merely for convenience.

Note that using the << >> operator syntax is recommended, see bool operator<<(const SlotContext&SC, const T&Variable);

References Wizt::TypedSlot< T >::getValue().

◆ getValueBT()

template<class T >
RefPtr< VTypedValueBase< T > > Wizt::TypedSlot< T >::getValueBT ( const RefPtr< ValuePool > &  VP) const
inline

A version of the getValue() function that yields a fitting VTypedValueBase<T> directly.

RefPtr<TypedSlot<int>> mySlot = ... ;
if (auto myValue = mySlot->getValueBT(Context))
{
int Value = 42;
if (myValue->getValue( Value ))
{
std::cout << "Got the value " << Value;
}
}

Note that using the << >> operator syntax is recommended, see bool operator<<(const SlotContext&SC, const T&Variable);

◆ operator()() [1/2]

template<class T >
RefPtr< VValueBase > Wizt::TypedSlot< T >::operator() ( const RefPtr< ValuePool > &  VP) const
inline

A shortcut version of member function getValue():

RefPtr<TypedSlot<int>> mySlot = ... ;
if (RefPtr<VTypedValueBase<int> > myValue = (*mySlot)(Context))
{
int Value = 42;
if (myValue->getValue( Value ))
{
std::cout << "Got the value " << Value;
}
}

Note that using the << >> operator syntax is recommended, see bool operator<<(const SlotContext&SC, const T&Variable);

References Wizt::TypedSlot< T >::getValue().

◆ operator()() [2/2]

template<class T >
const T & Wizt::TypedSlot< T >::operator() ( const T &  DefaultValue,
const RefPtr< ValuePool > &  VP 
) const
inline

An operator version of the getValue() member function, for convenience:

RefPtr<TypedSlot<int>> mySlot = ... ;
int DefaultValue = 42;
const int&mySlotValue = (*mySlot)( Context, DefaultValue );
std::cout << "Got the value " << mySlotValue;

Note that using the << >> operator syntax is recommended, see bool operator<<(const SlotContext&SC, const T&Variable);

References Wizt::TypedSlot< T >::getValue().

◆ operator/=()

template<class T >
const string & Wizt::TypedSlot< T >::operator/= ( const string &  s) const
inline
       Syntactic sugar to set the class for
       this slot such that it can be reused
       for other slots, e.g. as in
inSmoothTexture /=
inTextureBlend /=
inTextureField /=
inTextureShiftX /=
inTextureShiftY /=
inTextureScale /= "texture";

Friends And Related Symbol Documentation

◆ operator+=

template<class T >
const ValueSetPair & operator+= ( const ValueSetPair VSP,
const TypedSlot< T > &  VS 
)
friend
RefPtr<ValueSet> Changeables = new ValueSet();
Changeables & R += nLines, X, Y, Z, Length, DistributionWidth;
A set of values.
Definition ValueSet.hpp:33
Definition OmegaPtrCheck.cpp:14
Definition elementary/memcore/test/shared_ptr/main.cpp:55

◆ operator,

template<class T >
const ValueSetPair & operator, ( const ValueSetPair VSP,
const TypedSlot< T > &  VS 
)
friend
RefPtr<ValueSet> Changeables = new ValueSet();
Changeables & R += nLines, X, Y, Z, Length, DistributionWidth;

◆ operator<<

template<class T >
bool operator<< ( const SlotContext SC,
const T &  Variable 
)
friend

Assign a parameter's value within slot context, returns true or false, if this was possible or not.

Typical usage is like this:

RefPtr<TypedSlot<int>> mySlot = ... ;
int mySlotValue = 42;
*mySlot << Context << mySlotValue;

◆ operator<<=

template<class T >
bool operator<<= ( const SlotContext SC,
const T &  Variable 
)
friend

Assign a parameter's value within slot context IF it has changed.

This requires the existence of a comparision operator for type T. It will read the previous value of the slot into a temporary variable for comparison.

Returns
true if the value has been changed.

◆ operator>>

template<class T >
bool operator>> ( const SlotContext SC,
T &  Variable 
)
friend

Assign a variable from a slot context, returns true or false, if this was possible or not.

Typical usage is like this:

RefPtr<TypedSlot<int>> mySlot = ... ;
int mySlotValue = 42;
*mySlot << Context >> mySlotValue;
std::cout << "Got the value " << mySlotValue;