Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

gadget::EventWindowDepCheckerXWin Class Reference

Dependency checker for X Window System event source. More...

#include <EventWindowDepCheckerXWin.h>

List of all members.

Public Methods

 EventWindowDepCheckerXWin ()
virtual std::string getCheckerName ()
 Return a string name of the checker. More...

virtual bool canHandle (jccl::ConfigElementPtr element)
 We can handle only EventWindow configuration information. More...

virtual bool depSatisfied (jccl::ConfigElementPtr element)
 Are the dependencies satisfied? Check wether the display system element is in the active config. More...

bool haveDisplaySystemElement () const
virtual void debugOutDependencies (jccl::ConfigElementPtr element, int dbg_lvl=vprDBG_WARNING_LVL)
 Writes out the dependencies to the vprDEBUG macro. More...


Detailed Description

Dependency checker for X Window System event source.

Implement the basic stuff plus a check for wether the system knows about the system display windows yet.

Definition at line 54 of file EventWindowDepCheckerXWin.h.


Constructor & Destructor Documentation

gadget::EventWindowDepCheckerXWin::EventWindowDepCheckerXWin   [inline]
 

Definition at line 57 of file EventWindowDepCheckerXWin.h.

00058    {;}


Member Function Documentation

virtual std::string gadget::EventWindowDepCheckerXWin::getCheckerName   [inline, virtual]
 

Return a string name of the checker.

Used to output messages in checkerlistings.

Definition at line 64 of file EventWindowDepCheckerXWin.h.

00065    {
00066       return std::string("gadget::EventWindowXWin Checker");
00067    }

virtual bool gadget::EventWindowDepCheckerXWin::canHandle jccl::ConfigElementPtr    element [inline, virtual]
 

We can handle only EventWindow configuration information.

Definition at line 70 of file EventWindowDepCheckerXWin.h.

00071    {
00072       const std::string element_type = element->getID();
00073       // Return true if we have a EventWindowXWin element type.
00074       return (element_type == EventWindowXWin::getElementType());
00075    }

bool gadget::EventWindowDepCheckerXWin::depSatisfied jccl::ConfigElementPtr    element [virtual]
 

Are the dependencies satisfied? Check wether the display system element is in the active config.

Returns:
true is returned if default dependencies are satisfied and the Display Manager has display system element.

Definition at line 41 of file EventWindowDepCheckerXWin.cpp.

References haveDisplaySystemElement.

00042 {
00043    bool pass = jccl::DepChecker::depSatisfied(element);   // Run default check
00044 
00045    // If we can pass normal check and we have a display system element.
00046    if ( haveDisplaySystemElement() )
00047    {
00048       return pass;
00049    }
00050    else
00051    {
00052       return false;
00053    }
00054 }

bool gadget::EventWindowDepCheckerXWin::haveDisplaySystemElement   const [inline]
 

Definition at line 86 of file EventWindowDepCheckerXWin.h.

Referenced by debugOutDependencies, and depSatisfied.

00087    {
00088       return (gadget::InputManager::instance()->getDisplaySystemElement().get() != NULL);
00089    }

void gadget::EventWindowDepCheckerXWin::debugOutDependencies jccl::ConfigElementPtr    element,
int    dbg_lvl = vprDBG_WARNING_LVL
[virtual]
 

Writes out the dependencies to the vprDEBUG macro.

Definition at line 56 of file EventWindowDepCheckerXWin.cpp.

References haveDisplaySystemElement.

00058 {
00059    jccl::DepChecker::debugOutDependencies(element, dbg_lvl);
00060 
00061    vprDEBUG_NEXT_BEGIN(vprDBG_ALL,dbg_lvl)
00062       << "Extra Dependency: Dependent upon getting displaySystem element from Display Manager: "
00063       << vprDEBUG_FLUSH;
00064 
00065    if ( ! haveDisplaySystemElement() )
00066    {
00067       vprDEBUG_CONT(vprDBG_ALL,dbg_lvl) << "FAILED!!!\n" << vprDEBUG_FLUSH;
00068    }
00069    else
00070    {
00071       vprDEBUG_CONT(vprDBG_ALL,dbg_lvl) << "passed.\n" << vprDEBUG_FLUSH;
00072    }
00073 
00074    vprDEBUG_NEXT(vprDBG_ALL,dbg_lvl)
00075       << "Extra Dependencies for " << element->getFullName()
00076       << " (type: " << element->getID() << ")" << std::endl
00077       << vprDEBUG_FLUSH;
00078    vprDEBUG_NEXT(vprDBG_ALL,dbg_lvl)
00079       << "Dependent upon display_system element in Display Manager."
00080       << "  (Needed to find display strings.)"
00081       << vprDEBUG_FLUSH;
00082 
00083    vprDEBUG_NEXT_END(vprDBG_ALL,dbg_lvl) << std::endl << vprDEBUG_FLUSH;
00084 }


The documentation for this class was generated from the following files:
Generated on Sun May 2 14:26:47 2004 for Gadgeteer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002