The Vish Visualization Shell 0.3
Vish
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
Wizt::VAcceptInfo Class Reference

An intermediate class that holds information about what kind of input objects a certain VObject accepts. More...

#include <ocean/plankton/VAcceptInfo.hpp>

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

Public Types

typedef RefPtr< VAcceptInfo, VAcceptInfoVAcceptInfoPtr
 Alias for ptr (MSVC bug)
 
- Public Types inherited from MemCore::ReferenceBase< VAcceptInfo >
using reference_domain_t = VAcceptInfo
 The type of the base class.
 
using SelfPtr_t = WeakPtr< VAcceptInfo, VAcceptInfo >
 Type for a pointer to this object itself.
 

Public Member Functions

 VAcceptInfo (const type_info &type, const RefPtr< InterfaceBase > &=NullPtr())
 Create information what kind of input an object might accept.
 
 ~VAcceptInfo ()
 Destructor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< VAcceptInfo >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< VAcceptInfo, VAcceptInfo > &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 (VAcceptInfo *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.
 

Static Public Member Functions

static VAcceptInfoPtr adjustSuitability (const VAcceptInfoPtr &AI, double value)
 Set the suitability value.
 
static VAcceptInfoPtr setReason (const VAcceptInfoPtr &AI, const string &reason)
 Specify the reason why this acceptance is a good match.
 

Public Attributes

vector< string > Category
 A naming scheme for the related object.
 
string FoundOutputSlotName
 The name of the output slot found.
 
RefPtr< MemCore::InterfaceBaseib
 If this type is implemented in an interface rather than the object itself, say so here in this interface.
 
double suitability
 How well this acceptance suits the given object.
 
const type_info & what
 The type which is accepted here.
 
string why
 An optional text information telling why this is a good match.
 

Friends

VAcceptInfoPtr operator& (const VAcceptInfoPtr &AI, const string &reason)
 Convenience operator to set the reason information by just adding a string to the pointer.
 
VAcceptInfoPtr operator* (const VAcceptInfoPtr &AI, double value)
 Convenience operator to set the suitability flag by just multiplying the pointer with a double value.
 

Additional Inherited Members

- Protected Member Functions inherited from MemCore::ReferenceBase< VAcceptInfo >
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

An intermediate class that holds information about what kind of input objects a certain VObject accepts.

A certain VObject may be queried for VObject Creators which accept this certain VObject as input. It will provide a list of VAcceptInfo objects.

Currently, only VObjects can be queried; in principle, this query could be generalized to any VInputBase object, but it is not sure yet how such a query should be initiated.

Member Function Documentation

◆ adjustSuitability()

static VAcceptInfoPtr Wizt::VAcceptInfo::adjustSuitability ( const VAcceptInfoPtr AI,
double  value 
)
inlinestatic

Set the suitability value.

It will be multiplied by the given value, initially it is set to 1.0. Adjusting the suitability may thus increase or decrease the matching. Giving a value of zero here will specify that this is a bad match and should not be used. It's just a possible match, but not a good one.

◆ setReason()

static VAcceptInfoPtr Wizt::VAcceptInfo::setReason ( const VAcceptInfoPtr AI,
const string &  reason 
)
inlinestatic

Specify the reason why this acceptance is a good match.

This is supposed to be helpful information to the enduser.

Member Data Documentation

◆ why

string Wizt::VAcceptInfo::why

An optional text information telling why this is a good match.

This text may contain useful information to the user and should be used in conjunction with the suitability value.