Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Dependency< N > Class Template Reference

#include <Dependency.h>

Classes

class  Bound
 

Public Member Functions

 Dependency (const Dependency &dep)
 
const AZ::UuidGetID () const
 
void SetID (const AZ::Uuid &id)
 
const AZStd::stringGetName () const
 
void SetName (const AZStd::string &name)
 
const AZStd::vector< Bound > & GetBounds () const
 
bool IsFullfilledBy (const Specifier< N > &spec) const
 
AZ::Outcome< void, AZStd::stringParseVersions (const AZStd::vector< AZStd::string > &deps)
 

Public Attributes

AZ::Uuid m_id = AZ::Uuid::CreateNull()
 
AZStd::string m_name
 
AZStd::vector< Boundm_bounds
 

Detailed Description

template<size_t N>
class AZ::Dependency< N >

Defines a dependency upon another versioned object.

Member Function Documentation

◆ GetBounds()

template<size_t N>
const AZStd::vector< typename Dependency< N >::Bound > & AZ::Dependency< N >::GetBounds

Gets the bounds that the dependence's version must fulfill.

Returns
The list of bounds.

◆ GetID()

template<size_t N>
const AZ::Uuid & AZ::Dependency< N >::GetID

Gets the ID of the object depended on.

Returns
The ID of the object depended on.

◆ GetName()

template<size_t N>
const AZStd::string & AZ::Dependency< N >::GetName

Gets the name of the object depended on.

Returns
The name of the object depended on.

◆ IsFullfilledBy()

template<size_t N>
bool AZ::Dependency< N >::IsFullfilledBy ( const Specifier< N > &  spec) const

Checks if a specifier matches a dependency.

Checks that the specifier's ID is the one depended on, and that the version matches the bounds (which can be retrieved by GetBounds()).

\params[in] spec The specifier to test.

Returns
Whether or not the Specifier<N> fits the dependency.

◆ ParseVersions()

template<size_t N>
AZ::Outcome< void, AZStd::string > AZ::Dependency< N >::ParseVersions ( const AZStd::vector< AZStd::string > &  deps)

Parses version bounds from a list of strings.

Each string should fit the pattern [OPERATOR][VERSION], where [OPERATOR] is >, >=, <, <=, ==, ~> or ~=, and [VERSION] is a valid version string, parsable by AZ::Version<N>.

\params[in] deps The list of bound strings to parse.

Returns
True on success, false on failure.

◆ SetID()

template<size_t N>
void AZ::Dependency< N >::SetID ( const AZ::Uuid id)

Set the ID of the object depended on.

\params[in] id The ID of the dependency

◆ SetName()

template<size_t N>
void AZ::Dependency< N >::SetName ( const AZStd::string name)

Set the name of the object depended on.

\params[in] name The name of the dependency


The documentation for this class was generated from the following files: