00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Copyright (C) 2012 Sergey Lisitsyn 00008 */ 00009 00010 #ifndef TASKGROUP_H_ 00011 #define TASKGROUP_H_ 00012 00013 #include <shogun/base/SGObject.h> 00014 #include <shogun/transfer/multitask/Task.h> 00015 #include <shogun/transfer/multitask/TaskRelation.h> 00016 #include <shogun/lib/DynamicObjectArray.h> 00017 00018 namespace shogun 00019 { 00020 00026 class CTaskGroup : public CTaskRelation 00027 { 00028 public: 00029 00031 CTaskGroup(); 00032 00034 virtual ~CTaskGroup(); 00035 00040 virtual SGVector<index_t>* get_tasks_indices() const; 00041 00046 void append_task(CTask* task); 00047 00052 virtual int32_t get_num_tasks() const; 00053 00058 const char* get_name() const { return "TaskGroup"; }; 00059 00064 ETaskRelationType get_relation_type() const { return TASK_GROUP; } 00065 00066 private: 00067 00069 void init(); 00070 00071 protected: 00072 00074 CDynamicObjectArray* m_tasks; 00075 00076 }; 00077 } 00078 #endif 00079