NAP
serviceobjectgraphitem.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 #include "service.h"
8 
9 namespace nap
10 {
16  {
17  public:
18  using Type = Service*;
19 
20  // Default constructor
21  ServiceObjectGraphItem() = default;
22 
23  // Default destructor
24  ~ServiceObjectGraphItem() = default;
25 
31  static const ServiceObjectGraphItem create(Service* service, std::vector<Service*>* services);
32 
36  const std::string getID() const;
37 
45  bool getPointees(std::vector<ServiceObjectGraphItem>& pointees, utility::ErrorState& errorState);
46 
47  // The service this item references
48  Service* mObject = nullptr;
49 
50  // Core is used to resolve all pointers
51  std::vector<Service*>* mServices = nullptr;
52  };
53 }
nap::ServiceObjectGraphItem
Definition: serviceobjectgraphitem.h:15
nap::ServiceObjectGraphItem::mObject
Service * mObject
Definition: serviceobjectgraphitem.h:48
nap::utility::ErrorState
Definition: errorstate.h:19
nap::ServiceObjectGraphItem::~ServiceObjectGraphItem
~ServiceObjectGraphItem()=default
nap::Service
Definition: templateservice.h:8
nap::ServiceObjectGraphItem::create
static const ServiceObjectGraphItem create(Service *service, std::vector< Service * > *services)
nap::ServiceObjectGraphItem::getID
const std::string getID() const
nap
Definition: templateapp.h:17
nap::ServiceObjectGraphItem::mServices
std::vector< Service * > * mServices
Definition: serviceobjectgraphitem.h:51
nap::ServiceObjectGraphItem::getPointees
bool getPointees(std::vector< ServiceObjectGraphItem > &pointees, utility::ErrorState &errorState)
nap::ServiceObjectGraphItem::ServiceObjectGraphItem
ServiceObjectGraphItem()=default