Bifrost SDK
Bifrost SDK documentation
Library.h
Go to the documentation of this file.
1//-
2// ================================================================================================
3// Copyright 2025 Autodesk, Inc. All rights reserved.
4//
5// Use of this software is subject to the terms of the Autodesk license agreement provided
6// at the time of installation or download, or which otherwise accompanies this software in
7// either electronic or hard copy form.
8// ================================================================================================
9//+
10
15
16#ifndef BIFROSTGRAPH_EXECUTOR_LIBRARY_H
17#define BIFROSTGRAPH_EXECUTOR_LIBRARY_H
18
19#include <BifrostGraph/Executor/internal/ExecutorExport.h>
20#include <BifrostGraph/Executor/internal/PropagateConstPtr.h>
21
25
26#include <Amino/Core/String.h>
27
28//-------------------------------------------------------------------------------------------------
29// Forward declarations
30//-------------------------------------------------------------------------------------------------
31
32namespace BifrostGraph {
33namespace Executor {
34
35class Workspace;
36
37namespace Private {
38class LibraryImpl;
39class IRestrictedLibraryServices;
40} // namespace Private
41
43
44//-------------------------------------------------------------------------------------------------
45// CLASS Library
46//-------------------------------------------------------------------------------------------------
47
53class BIFROSTGRAPH_EXECUTOR_SHARED_DECL Library final {
54protected:
55 //---------------------------------------------------------------------------------------------
56 // Initialization
57 //---------------------------------------------------------------------------------------------
58
69 explicit Library(const Amino::String& name) noexcept;
70
78 explicit Library(Uninitialized uninitialized) noexcept;
79
82
84 friend class Workspace;
85
86public:
88 ~Library() noexcept;
89
97 bool isValid() const noexcept;
98
102 static Library& getInvalid() noexcept;
103
104 //---------------------------------------------------------------------------------------------
105 // Resources Services
106 //---------------------------------------------------------------------------------------------
107
117 bool loadDefinitionFile(const Amino::String& filePath, StringArray& nameList) noexcept;
118
127 bool saveDefinitionFile(const Amino::String& filePath) noexcept;
128
129 //---------------------------------------------------------------------------------------------
130 // IRestrictedLibraryServices
131 //---------------------------------------------------------------------------------------------
132
141 const Private::IRestrictedLibraryServices& getRestrictedServices() const noexcept;
142 Private::IRestrictedLibraryServices& getRestrictedServices() noexcept;
144
145private:
148 Library(const Library&) = delete;
149 Library(Library&&) = delete;
150 Library& operator=(const Library&) = delete;
151 Library& operator=(Library&&) = delete;
153
154private:
155 Internal::PropagateConstPtr<Private::LibraryImpl, Internal::Owned::kYes> m_impl;
156 static Library s_invalid;
157};
158
159} // namespace Executor
160} // namespace BifrostGraph
161
162#endif // BIFROSTGRAPH_EXECUTOR_LIBRARY_H
String class.
Provide factory functions for Executor core classes.
BifrostGraph Executor Owner helper class.
Amino::String filePath(Amino::StringView directory, Amino::StringView filename)
Create a file path from a directory and an filename in an operating system / independent way.
Uninitialized
Tag for explicitly specifying that a constructor should not initialize any data members,...
Definition: Types.h:59
Definition: HostData.h:33
Define a Amino array of elements of type T.
Definition: Array.h:105
The string class used by Amino.
Definition: String.h:46
A Library of types and node definitions that can be used by Bifrost.
Definition: Library.h:53
~Library() noexcept
Destructor.
EXECUTOR_DECLARE_MAKE_OWNER_FRIENDSHIP()
Allow the makeOwner<> factory functions to access the constructors of this class.
Library(Uninitialized uninitialized) noexcept
Constructor that leaves the Library in an uninitialized state.
Library(const Amino::String &name) noexcept
Construct a Library with the given name.
The Workspace is the central element of the BifrostGraph Executor.
Definition: Workspace.h:69
BifrostGraph Executor common types.