00001 /* 00002 * StubBasicTaskQosket.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 StubBasicTaskQosket.hh 00014 * 00015 * Header file for the StubBasicTaskQosket class. 00016 */ 00017 00018 #ifndef _stub_basic_task_qosket_hh 00019 #define _stub_basic_task_qosket_hh 00020 00021 #include "BasicTaskQosketImpl.hh" 00022 #include "StubBasicTaskCallback.hh" 00023 00024 /** 00025 * A BasicTaskQosketImpl subclass that can be used for testing. 00026 */ 00027 class StubBasicTaskQosket : public BasicTaskQosketImpl 00028 { 00029 00030 public: 00031 00032 /** 00033 * Initialize the object with a callback. This implementation completely 00034 * overrides the standard one and makes a StubBasicTaskCallback instead 00035 * of a BasicTaskCallbackImpl. 00036 * 00037 * @param orb Unused. 00038 */ 00039 void initCallbacks(const CORBA::ORB_ptr &orb) 00040 throw (CORBA::SystemException) 00041 { 00042 Qosket::Basic::BasicTaskCallback_var btc; 00043 00044 this->btq_Callback = new StubBasicTaskCallback(); 00045 btc = this->btq_Callback->_this(); 00046 this->myCallback = Qosket::Basic::BasicTaskCallback:: 00047 _duplicate(btc.in()); 00048 }; 00049 00050 /** 00051 * The callback object created by initCallbacks. 00052 */ 00053 StubBasicTaskCallback *btq_Callback; 00054 00055 }; 00056 00057 #endif