NAP
linkresolver.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 "unresolvedpointer.h"
8 #include <utility/dllexport.h>
9 
10 namespace nap
11 {
12  namespace utility
13  {
14  class ErrorState;
15  }
16 
17  namespace rtti
18  {
25  class NAPAPI LinkResolver
26  {
27  public:
28  virtual ~LinkResolver() = default;
29 
36  bool resolveLinks(const UnresolvedPointerList& unresolvedPointers, utility::ErrorState& errorState);
37 
38  protected:
40  {
41  TreatAsError,
42  Ignore
43  };
44 
50  virtual Object* findTarget(const std::string& targetID) = 0;
51 
57  virtual EInvalidLinkBehaviour onInvalidLink(const UnresolvedPointer& unresolvedPointer) = 0;
58  };
59  }
60 }
nap::rtti::Object
Definition: object.h:30
nap::utility::ErrorState
Definition: errorstate.h:19
nap::rtti::UnresolvedPointer
Definition: unresolvedpointer.h:28
nap
Definition: templateapp.h:17
nap::rtti::UnresolvedPointerList
std::vector< UnresolvedPointer > UnresolvedPointerList
Definition: unresolvedpointer.h:51