LocalizationJob.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package MemoryX::Core
17 * @author Kai Welke <welke@kit.edu>
18 * @copyright 2012 Kai Welke
19 * @license http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
25 #include <string>
27 #include <Ice/Ice.h>
28 #include <IceUtil/Handle.h>
29 
31 #include <MemoryX/interface/observers/ObjectMemoryObserverInterface.h>
32 
33 namespace memoryx
34 {
35  class LocalizationQuery;
36 
37  /**
38  * @brief The LocalizationJob class is the description of the basic workload executed by ObjectLocalizationMemoryUpdater
39  *
40  * It describes which object classes to localize, which method to use, and which LocalizationQuery instance the job belongs to.
41  */
43  public Ice::LocalObject
44  {
45  public:
46  void init(IceInternal::Handle<LocalizationQuery> query, std::string recognitionMethod, const std::vector<std::string>& classNames);
47 
48  virtual void start() {}
49  virtual bool waiting() = 0;
50 
51  std::string getRecognitionMethod();
52  std::vector<std::string> getAllClassNames();
53  std::vector<std::string> getClassNamesToBeLocalized();
54  void setClassNamesToBeLocalized(const std::vector<std::string>& classNamesToBeLocalized);
55  std::string getQueryName();
57 
58  void setFinished();
59 
60  private:
62  std::vector<std::string> classNames;
63  std::vector<std::string> classNamesToBeLocalized;
64  std::string recognitionMethod;
65  };
66 
68  using LocalizationJobList = std::vector<LocalizationJobPtr>;
69 }
70 
memoryx::LocalizationJob::setClassNamesToBeLocalized
void setClassNamesToBeLocalized(const std::vector< std::string > &classNamesToBeLocalized)
Definition: LocalizationJob.cpp:52
memoryx::LocalizationJob::getQueryName
std::string getQueryName()
Definition: LocalizationJob.cpp:57
memoryx::LocalizationJob
The LocalizationJob class is the description of the basic workload executed by ObjectLocalizationMemo...
Definition: LocalizationJob.h:42
memoryx::LocalizationJob::getQuery
IceInternal::Handle< LocalizationQuery > getQuery()
Definition: LocalizationJob.cpp:62
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
ObjectClass.h
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::LocalizationJob::start
virtual void start()
Definition: LocalizationJob.h:48
armarx::VariantType::LocalizationQuery
const armarx::VariantTypeId LocalizationQuery
Definition: LocalizationQuery.h:37
memoryx::LocalizationJob::getAllClassNames
std::vector< std::string > getAllClassNames()
Definition: LocalizationJob.cpp:42
memoryx::LocalizationJob::waiting
virtual bool waiting()=0
memoryx::LocalizationJob::setFinished
void setFinished()
Definition: LocalizationJob.cpp:67
IceUtil::Handle
Definition: forward_declarations.h:29
ImportExport.h
memoryx::LocalizationJobList
std::vector< LocalizationJobPtr > LocalizationJobList
Definition: LocalizationJob.h:68
memoryx::LocalizationJob::init
void init(IceInternal::Handle< LocalizationQuery > query, std::string recognitionMethod, const std::vector< std::string > &classNames)
Definition: LocalizationJob.cpp:29
memoryx::LocalizationJob::getClassNamesToBeLocalized
std::vector< std::string > getClassNamesToBeLocalized()
Definition: LocalizationJob.cpp:47
memoryx::LocalizationJob::getRecognitionMethod
std::string getRecognitionMethod()
Definition: LocalizationJob.cpp:37