Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

StubBasicTaskCallback.hh

Go to the documentation of this file.
00001 /*
00002  * StubBasicTaskCallback.hh
00003  *
00004  * Copyright (c) 2003 The University of Utah and the Flux Group.
00005  * All rights reserved.
00006  *
00007  * This file is licensed under the terms of the GNU Public License.  
00008  * See the file "license.terms" for restrictions on redistribution 
00009  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  */
00011 
00012 /**
00013  * @file StubBasicTaskCallback.hh
00014  *
00015  * Header file and implementation of the StubBasicTaskCallback class.
00016  */
00017 
00018 #ifndef _stub_basic_task_callback_hh
00019 #define _stub_basic_task_callback_hh
00020 
00021 #include "BasicTaskCallbackS.h"
00022 
00023 /**
00024  * A stub Qosket::Basic::BasicTaskCallback that can be used for testing.
00025  */
00026 class StubBasicTaskCallback :
00027     public virtual POA_Qosket::Basic::BasicTaskCallback
00028 {
00029 
00030 public:
00031 
00032     /**
00033      * Construct a new StubBasicTaskCallback.
00034      */
00035     StubBasicTaskCallback(void)
00036     {
00037         this->btc_Missed = 0;
00038         this->btc_Made = 0;
00039     }
00040 
00041     /**
00042      * Deconstruct a StubBasicTaskCallback.
00043      */
00044     virtual ~StubBasicTaskCallback(void)
00045     {
00046     };
00047 
00048     /**
00049      * Log a message through the callback.  This implementation ignores the
00050      * parameter and prints nothing.
00051      *
00052      * @param msg The message to log.
00053      */
00054     void sendMessage(const char *msg)
00055         throw (CORBA::SystemException)
00056     {
00057     }
00058 
00059     /**
00060      * @copydoc Qosket::Basic::BasicTaskCallback::MissedDeadline
00061      *
00062      * This implementation will simply increment the btc_Missed variable by
00063      * one.
00064      */
00065     void MissedDeadline(void)
00066         throw (CORBA::SystemException)
00067     {
00068         this->btc_Missed += 1;
00069     }
00070     
00071     /**
00072      * @copydoc Qosket::Basic::BasicTaskCallback::MadeDeadline
00073      *
00074      * This implementation will simply increment the btc_Made variable by one.
00075      */
00076     void MadeDeadline(void)
00077         throw (CORBA::SystemException)
00078     {
00079         this->btc_Made += 1;
00080     }
00081 
00082     /**
00083      * Counter that records the number of times MissedDeadline() has been
00084      * called.
00085      */
00086     unsigned int btc_Missed;
00087 
00088     /**
00089      * Counter that records the number of times MadeDeadline() has been called.
00090      */
00091     unsigned int btc_Made;
00092     
00093 };
00094 
00095 #endif

Generated on Mon Dec 1 16:21:56 2003 for CPUBroker by doxygen 1.3.4