DDS  ver. 3.6
TopoElement.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__TopoElement__
7 #define __DDS__TopoElement__
8 
9 // DDS
10 #include "TopoBase.h"
11 // STD
12 #include <string>
13 
14 namespace dds
15 {
16  namespace topology_api
17  {
18  class CTopoElement : public CTopoBase
19  {
20  public:
21  using Ptr_t = std::shared_ptr<CTopoElement>;
22  using PtrVector_t = std::vector<CTopoElement::Ptr_t>;
23 
25  virtual size_t getNofTasks() const = 0;
26 
28  virtual size_t getTotalNofTasks() const = 0;
29 
30  protected:
32  CTopoElement(const std::string& _name);
33 
35  virtual ~CTopoElement();
36 
39  size_t getTotalCounterDefault() const;
40  };
41  } // namespace topology_api
42 } // namespace dds
43 #endif /* defined(__DDS__TopoElement__) */
Definition: TopoBase.h:20
size_t getTotalCounterDefault() const
If parent is a group than return N, else return 1. Default implementation for Task::getTotalCounter a...
Definition: TopoElement.cpp:24
CTopoElement(const std::string &_name)
Constructor.
Definition: TopoElement.cpp:14
virtual size_t getTotalNofTasks() const =0
Return total number of tasks, i.e. number of tasks multiplied by n.
std::shared_ptr< CTopoBase > Ptr_t
Definition: TopoBase.h:36
virtual size_t getNofTasks() const =0
Return number of all tasks including daughter elements.
Definition: TopoElement.h:18
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
std::vector< CTopoBase::Ptr_t > PtrVector_t
Definition: TopoBase.h:37
virtual ~CTopoElement()
Destructor.
Definition: TopoElement.cpp:20