|
Bifrost SDK
Bifrost SDK documentation
|
A Library of types and node definitions that can be used by Bifrost. More...
#include <Library.h>
Public Member Functions | |
| ~Library () noexcept | |
| Destructor. More... | |
| bool | isValid () const noexcept |
| Check if this Library has been successfully initialized. More... | |
| bool | loadDefinitionFile (const Amino::String &filePath, StringArray &nameList) noexcept |
| Load into the Library the types, operators, terminal nodes and compounds found in a Bifrost definition JSON file, if the file has not already been loaded. More... | |
| bool | saveDefinitionFile (const Amino::String &filePath) noexcept |
| Save from the Library the types, operators, terminal nodes and compounds found in a Bifrost definition JSON file, if the file has already been loaded. More... | |
| const Private::IRestrictedLibraryServices & | getRestrictedServices () const noexcept |
| Obtain an interface giving access to private Library services. More... | |
| Private::IRestrictedLibraryServices & | getRestrictedServices () noexcept |
| Obtain an interface giving access to private Library services. More... | |
Static Public Member Functions | |
| static Library & | getInvalid () noexcept |
| Get a statically allocated Library that is uninitialized, invalid and not owned by any Workspace. Any operation on this instance will always fail and Library::isValid will return false. More... | |
Protected Member Functions | |
| Library (const Amino::String &name) noexcept | |
| Construct a Library with the given name. More... | |
| Library (Uninitialized uninitialized) noexcept | |
| Constructor that leaves the Library in an uninitialized state. More... | |
| EXECUTOR_DECLARE_MAKE_OWNER_FRIENDSHIP () | |
| Allow the makeOwner<> factory functions to access the constructors of this class. More... | |
Friends | |
| class | Workspace |
| Allow the Workspace class to access the constructors of a Library. More... | |
A Library of types and node definitions that can be used by Bifrost.
Access to types and node definitions is provided through a Library. Types and node definitions are added to the Library by loading resource files.
|
explicitprotectednoexcept |
Construct a Library with the given name.
If an error occurs during the construction of this Library, or its underlying Amino::Context or Amino::Library, then BifrostGraph::Executor::Library::isValid will return false and all future operations on the Library will fail.
This constructor is private to force the usage of factory functions BifrostGraph::Executor::makeOwner (see Factory.h) to create it.
| [in] | name | An optional name for the Library. |
|
explicitprotectednoexcept |
Constructor that leaves the Library in an uninitialized state.
After this constructor returns, the method BifrostGraph::Executor::Library::isValid will return false and all future operations on the Library will fail.
| [in] | uninitialized | an Uninitialized enum value. |
|
noexcept |
Destructor.
|
protected |
Allow the makeOwner<> factory functions to access the constructors of this class.
|
staticnoexcept |
Get a statically allocated Library that is uninitialized, invalid and not owned by any Workspace. Any operation on this instance will always fail and Library::isValid will return false.
|
noexcept |
Obtain an interface giving access to private Library services.
|
noexcept |
Obtain an interface giving access to private Library services.
|
noexcept |
|
noexcept |
Load into the Library the types, operators, terminal nodes and compounds found in a Bifrost definition JSON file, if the file has not already been loaded.
| [in] | filePath | Path to a Bifrost definition JSON file. |
| [out] | nameList | The list of fully qualified names of the public compounds loaded from the Bifrost definition JSON file designated by filePath. This returned list is filled even when the Bifrost definition JSON file was already loaded. |
filePath was already loaded or if it has just been successfully loaded; false otherwise.
|
noexcept |
Save from the Library the types, operators, terminal nodes and compounds found in a Bifrost definition JSON file, if the file has already been loaded.
Re-saving updates the resources and applies migration.
| [in] | filePath | Path to a Bifrost definition JSON file. |