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

Base class for convenient messing around with the status to be displayed for a certain object. More...

#include <ocean/shrimp/VObjectStatus.hpp>

Inheritance diagram for Wizt::StatusIndicator:
GeoCameraLens Wizt::CatchStatus Wizt::CrossSectionCam Wizt::MovieRecorder Wizt::VCameraLens Wizt::VRenderObject Wizt::VStereoLens Wizt::WebVish

Public Member Functions

bool setStatusCritical (const RefPtr< ValuePool > &Context, const string &what) const
 Same as setStatusError() but with an annoying popup message.
 
bool setStatusError (const RefPtr< ValuePool > &Context, const string &what, bool AnnouncePublic=false) const
 Indicate an error happening to this object.
 
bool setStatusInfo (const RefPtr< ValuePool > &Context, const string &what) const
 Set the status info text for the given object, relative to the given context.
 
bool setStatusWarning (const RefPtr< ValuePool > &Context, const string &what) const
 Indicate an informative warning message happening to this object.
 
 StatusIndicator (VObject *what, const string &initialtext="", int EL=0, const string &statusslotname=Slotname)
 
virtual ~StatusIndicator ()
 Destructor, virtual, such that dynamic type information is possible.
 

Public Attributes

VOutput< VObjectStatusStatusInfo
 The exported slot.
 

Static Public Attributes

static const char Slotname [] = "status"
 The name of the slot that will be used for this status.
 

Detailed Description

Base class for convenient messing around with the status to be displayed for a certain object.

Examples
InteractivePoint.cpp.

Constructor & Destructor Documentation

◆ StatusIndicator()

Wizt::StatusIndicator::StatusIndicator ( VObject what,
const string &  initialtext = "",
int  EL = 0,
const string &  statusslotname = Slotname 
)
       Constructor
       @code

struct MyObject : VObject, StatusIndicator { MyObject(...) : VObject(...), StatusIndicator(this) {} };

Member Function Documentation

◆ setStatusError()

bool Wizt::StatusIndicator::setStatusError ( const RefPtr< ValuePool > &  Context,
const string &  what,
bool  AnnouncePublic = false 
) const

Indicate an error happening to this object.

Parameters
AnnouncePublicIf true then the error messages produced here will also be announced to the VActionNotifier which possibly pops up some intentionally annoying window to the user, and might go into some logfile.

References Wizt::VObjectStatus::status, StatusInfo, and Wizt::VActionNotifier::Warning().

Referenced by Wizt::DeferredRenderObject::renderGL().

◆ setStatusInfo()

bool Wizt::StatusIndicator::setStatusInfo ( const RefPtr< ValuePool > &  Context,
const string &  what 
) const

Set the status info text for the given object, relative to the given context.

Returns
Always returns true. The sole purpose of the return value is to enable one-line if-return statements such as
bool f(Context)
{
if ( notgood() ) return setStatusInfo( Context, "not good");
...
return setStatusInfo( Context, "all is fine" );
}
A set of variable names, with indices associated to each type.
Definition Context.hpp:18
bool setStatusInfo(const RefPtr< ValuePool > &Context, const string &what) const
Set the status info text for the given object, relative to the given context.
Definition VObjectStatus.cpp:25

References Wizt::VObjectStatus::status, and StatusInfo.

Referenced by Wizt::VCameraLens::environment_render(), GeoCameraLens::environment_render(), Wizt::CatchStatus::update(), and Wizt::DeferredRenderObject::update().