The Vish Visualization Shell 0.3
Vish
Wizt::Intercube Class Reference

A container that holds many Interfaces. More...

#include <elementary/memcore/Interface.hpp>

Inheritance diagram for Wizt::Intercube:
A< Object > A< Object > B MemCore::Lexicon MemCore::LoaderParameters MemCore::SaveParameters Wizt::RenderAble::SubContext Wizt::Seagrass Wizt::Task Wizt::TextureBase Wizt::VBO Wizt::VContext::Addendum Wizt::VFrameBuffer::Renderer Wizt::VManagedObject Wizt::VOperatorCache< OperatorData > Wizt::VParameter Wizt::VStateCreatorBase::State Wizt::ValueNotifier Wizt::ValuePool

Classes

struct  interfacemap

Public Member Functions

void addInterface (const RefPtr< InterfaceBase > &I) const
 Add an interface class object.
template<class Data, typename TypeSelector>
void addInterfaceData (const Data &D)
 Add data via an interface class object.
template<class Data>
void addInterfaceData (const Data &D)
 Add data via an interface class object.
void clearInterfaces ()
 Remove all interfaces.
bool const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const
 Constant iterator.
virtual RefPtr< InterfaceBasecreateInterface (const type_info &) const
 Virtual function which allows derived objects to create Interface objects on demand.
RefPtr< InterfaceBasefindInterface (const type_info &t) const
 Find a certain interface of specified type.
RefPtr< InterfaceBasegetInterface (const type_info &t)
 Retrieve an interface object from a certain type.
std::string getInterfaceNames (const char delim=';') const
 Debug function retrieving all interfaces as human-readable string.
template<class Data>
bool gotNewInterfaceData (const Data &D)
 Check whether data on the given interface have changed, and if so, set new data as interface.
template<class Data, typename Selector>
bool gotNewInterfaceData (mutex &M, const Data &D)
 Check whether interface data have changed, if so, then set new interface data and return true.
template<class Data>
bool gotNewInterfaceData (mutex &M, const Data &D)
 Check whether interface data have changed, if so, then set new interface data and return true.
template<class Data, typename Selector>
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector &S)
 Check whether interface data have changed, if so, then set new interface data and return true.
template<class Data, typename Selector>
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector *S)
 Check whether interface data have changed, if so, then set new interface data and return true.
template<class Data, typename Selector>
bool hasChangedInterfaceData (const Data &D) const
 Check whether interface data have changed.
template<class Data>
bool hasChangedInterfaceData (const Data &D) const
 Check whether interface data have changed.
template<class Data, typename Selector>
bool hasChangedInterfaceData (const Data &D, const Selector &) const
 Check whether interface data have changed.
template<class Data, typename Selector>
bool hasChangedInterfaceData (const Data &D, const Selector *) const
 Check whether interface data have changed.
bool hasInterface (const type_info &t) const
 Check if some Interface might exist.
 Intercube ()
 Constructor.
bool iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP)
 Modifyable iterator.
void printInterfaces () const
 Debug function that prints the names of all interfaces.
void registerInterface (const type_info &t)
 Register an interface type; when the interface is actually required, the virtual createInterface() function will be called.
template<class InterfaceType>
void removeInterface ()
 Remove an interface.
void removeInterfaceBase (const type_info &InterfaceBaseID)
 Remove an interface.
virtual ~Intercube ()
 Destructor.

Detailed Description

A container that holds many Interfaces.

An interface is an object that is associated with a certain "domain type". Many interface classes may exist for the same domain type, but only one interface object may exist per container. The domain type itself is a dummy type which is never instantiated, it is used only to group certain interface classes into a common hierarchy.

Its name stems from the observation that a cube has multiple faces, so an Intercube must have multiple Interfaces as well.

Member Function Documentation

◆ findInterface()

RefPtr< InterfaceBase > MemCore::Intercube::findInterface ( const type_info & t) const

Find a certain interface of specified type.

Parameters
tThe interface type to be queried.

◆ getInterface()

Retrieve an interface object from a certain type.

Might create the interface on demand.

◆ hasInterface()

bool MemCore::Intercube::hasInterface ( const type_info & t) const

Check if some Interface might exist.

Does not create the interface if it does not exist.