00001 /* 00002 * (c) Copyright 2008, IBM Corporation. 00003 * Licensed under the Apache License, Version 2.0 (the "License"); 00004 * you may not use this file except in compliance with the License. 00005 * You may obtain a copy of the License at 00006 * 00007 * http://www.apache.org/licenses/LICENSE-2.0 00008 * 00009 * Unless required by applicable law or agreed to in writing, software 00010 * distributed under the License is distributed on an "AS IS" BASIS, 00011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00012 * See the License for the specific language governing permissions and 00013 * limitations under the License. 00014 * 00015 * Change History: 00016 * 00017 * yy-mm-dd Developer Defect Description 00018 * -------- --------- ------ ----------- 00019 * 08-07-21 huirui N/A Initial implementation 00020 */ 00021 #ifndef TESTTHREAD_H 00022 #define TESTTHREAD_H 00023 00024 #include <vector> 00025 #include <amino/thread.h> 00026 00035 using namespace amino; 00036 00037 namespace test { 00038 template<typename ParaType> class TestThread: public Thread { 00039 public: 00040 //inVec and outVec holds elements witch is operated by "in" and "out" liked operator. 00041 std::vector<ParaType> inVec; 00042 std::vector<ParaType> outVec; 00043 00044 TestThread() { 00045 Thread(); 00046 } 00047 explicit TestThread(int id) : 00048 Thread(id) { 00049 } 00050 explicit TestThread(std::string n, Runnable *r = NULL) : 00051 Thread(n, r) { 00052 } 00053 explicit TestThread(Runnable *r) : 00054 Thread(r) { 00055 } 00056 virtual ~TestThread() { 00057 } 00058 }; 00059 } 00060 #endif