Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Olympe::ParameterSchemaRegistry Class Reference

#include <ParameterSchemaRegistry.h>

+ Collaboration diagram for Olympe::ParameterSchemaRegistry:

Public Member Functions

void RegisterSchema (const ComponentSchema &schema)
 
void UnregisterSchema (const std::string &componentName)
 
bool HasSchema (const std::string &componentName) const
 
const ComponentSchemaGetSchema (const std::string &componentName) const
 
const std::vector< ComponentSchema > & GetAllSchemas () const
 
void LoadSchemasFromFile (const std::string &filePath)
 
void LoadSchemasFromDirectory (const std::string &directoryPath)
 
void ClearAllSchemas ()
 
std::vector< std::string > GetSchemaNames () const
 
std::vector< ComponentSchemaGetSchemasByCategory (const std::string &category) const
 
std::vector< ComponentSchemaSearchSchemas (const std::string &query) const
 
std::vector< std::string > GetCategories () const
 
std::vector< ComponentSchemaGetSchemasInCategory (const std::string &category) const
 
const ParameterDefinitionGetParameterDefinition (const std::string &componentName, const std::string &parameterName) const
 
std::vector< ParameterDefinitionGetParametersForComponent (const std::string &componentName) const
 
bool ValidateComponent (const ComponentData &component) const
 
bool ValidateParameter (const std::string &componentName, const std::string &parameterName, const std::string &value) const
 
void RebuildCategoryIndex ()
 
void ClearCache ()
 
size_t GetSchemaCount () const
 
size_t GetCategoryCount () const
 
size_t GetTotalParameterCount () const
 
bool IsSchemaDeprecated (const std::string &componentName) const
 
std::vector< ComponentSchemaGetDeprecatedSchemas () const
 

Static Public Member Functions

static ParameterSchemaRegistryGet ()
 

Private Member Functions

 ParameterSchemaRegistry ()
 
 ~ParameterSchemaRegistry ()
 
 ParameterSchemaRegistry (const ParameterSchemaRegistry &)=delete
 
ParameterSchemaRegistryoperator= (const ParameterSchemaRegistry &)=delete
 
void UpdateIndices ()
 

Private Attributes

std::vector< ComponentSchemam_schemas
 
std::map< std::string, size_tm_schemaIndex
 
std::map< std::string, std::vector< size_t > > m_categoryIndex
 

Static Private Attributes

static ParameterSchemaRegistrys_instance = nullptr
 

Detailed Description

Definition at line 14 of file ParameterSchemaRegistry.h.

Constructor & Destructor Documentation

◆ ParameterSchemaRegistry() [1/2]

ParameterSchemaRegistry::ParameterSchemaRegistry ( )
private

Definition at line 7 of file ParameterSchemaRegistry.cpp.

Referenced by Get().

+ Here is the caller graph for this function:

◆ ~ParameterSchemaRegistry()

ParameterSchemaRegistry::~ParameterSchemaRegistry ( )
private

Definition at line 8 of file ParameterSchemaRegistry.cpp.

◆ ParameterSchemaRegistry() [2/2]

Olympe::ParameterSchemaRegistry::ParameterSchemaRegistry ( const ParameterSchemaRegistry )
privatedelete

Member Function Documentation

◆ ClearAllSchemas()

void ParameterSchemaRegistry::ClearAllSchemas ( )

Definition at line 42 of file ParameterSchemaRegistry.cpp.

References m_categoryIndex, m_schemaIndex, and m_schemas.

◆ ClearCache()

void ParameterSchemaRegistry::ClearCache ( )

Definition at line 83 of file ParameterSchemaRegistry.cpp.

◆ Get()

ParameterSchemaRegistry & ParameterSchemaRegistry::Get ( )
static

Definition at line 10 of file ParameterSchemaRegistry.cpp.

References ParameterSchemaRegistry(), and s_instance.

+ Here is the call graph for this function:

◆ GetAllSchemas()

const std::vector< ComponentSchema > & ParameterSchemaRegistry::GetAllSchemas ( ) const

Definition at line 36 of file ParameterSchemaRegistry.cpp.

References m_schemas.

◆ GetCategories()

std::vector< std::string > ParameterSchemaRegistry::GetCategories ( ) const

Definition at line 54 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and m_categoryIndex.

+ Here is the call graph for this function:

◆ GetCategoryCount()

size_t ParameterSchemaRegistry::GetCategoryCount ( ) const

Definition at line 86 of file ParameterSchemaRegistry.cpp.

References m_categoryIndex.

◆ GetDeprecatedSchemas()

std::vector< ComponentSchema > ParameterSchemaRegistry::GetDeprecatedSchemas ( ) const

Definition at line 93 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and m_schemas.

+ Here is the call graph for this function:

◆ GetParameterDefinition()

const ParameterDefinition * ParameterSchemaRegistry::GetParameterDefinition ( const std::string &  componentName,
const std::string &  parameterName 
) const

Definition at line 60 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and GetSchema().

+ Here is the call graph for this function:

◆ GetParametersForComponent()

std::vector< ParameterDefinition > ParameterSchemaRegistry::GetParametersForComponent ( const std::string &  componentName) const

Definition at line 67 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and GetSchema().

+ Here is the call graph for this function:

◆ GetSchema()

const ComponentSchema * ParameterSchemaRegistry::GetSchema ( const std::string &  componentName) const

Definition at line 29 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), m_schemaIndex, and m_schemas.

Referenced by GetParameterDefinition(), GetParametersForComponent(), and IsSchemaDeprecated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSchemaCount()

size_t ParameterSchemaRegistry::GetSchemaCount ( ) const

Definition at line 85 of file ParameterSchemaRegistry.cpp.

References m_schemas.

◆ GetSchemaNames()

std::vector< std::string > ParameterSchemaRegistry::GetSchemaNames ( ) const

Definition at line 45 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and m_schemas.

+ Here is the call graph for this function:

◆ GetSchemasByCategory()

std::vector< ComponentSchema > ParameterSchemaRegistry::GetSchemasByCategory ( const std::string &  category) const

Definition at line 48 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and m_schemas.

Referenced by GetSchemasInCategory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSchemasInCategory()

std::vector< ComponentSchema > ParameterSchemaRegistry::GetSchemasInCategory ( const std::string &  category) const

Definition at line 57 of file ParameterSchemaRegistry.cpp.

References GetSchemasByCategory().

+ Here is the call graph for this function:

◆ GetTotalParameterCount()

size_t ParameterSchemaRegistry::GetTotalParameterCount ( ) const

Definition at line 87 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and m_schemas.

+ Here is the call graph for this function:

◆ HasSchema()

bool ParameterSchemaRegistry::HasSchema ( const std::string &  componentName) const

Definition at line 26 of file ParameterSchemaRegistry.cpp.

References m_schemaIndex.

◆ IsSchemaDeprecated()

bool ParameterSchemaRegistry::IsSchemaDeprecated ( const std::string &  componentName) const

Definition at line 90 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and GetSchema().

+ Here is the call graph for this function:

◆ LoadSchemasFromDirectory()

void ParameterSchemaRegistry::LoadSchemasFromDirectory ( const std::string &  directoryPath)

Definition at line 40 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ LoadSchemasFromFile()

void ParameterSchemaRegistry::LoadSchemasFromFile ( const std::string &  filePath)

Definition at line 39 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ operator=()

ParameterSchemaRegistry & Olympe::ParameterSchemaRegistry::operator= ( const ParameterSchemaRegistry )
privatedelete

◆ RebuildCategoryIndex()

void ParameterSchemaRegistry::RebuildCategoryIndex ( )

Definition at line 80 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), m_categoryIndex, and m_schemas.

+ Here is the call graph for this function:

◆ RegisterSchema()

void ParameterSchemaRegistry::RegisterSchema ( const ComponentSchema schema)

Definition at line 16 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), m_schemas, and UpdateIndices().

+ Here is the call graph for this function:

◆ SearchSchemas()

std::vector< ComponentSchema > ParameterSchemaRegistry::SearchSchemas ( const std::string &  query) const

Definition at line 51 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), and m_schemas.

+ Here is the call graph for this function:

◆ UnregisterSchema()

void ParameterSchemaRegistry::UnregisterSchema ( const std::string &  componentName)

Definition at line 19 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), m_schemas, and UpdateIndices().

+ Here is the call graph for this function:

◆ UpdateIndices()

void ParameterSchemaRegistry::UpdateIndices ( )
private

Definition at line 96 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static(), m_categoryIndex, m_schemaIndex, and m_schemas.

Referenced by RegisterSchema(), and UnregisterSchema().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValidateComponent()

bool ParameterSchemaRegistry::ValidateComponent ( const ComponentData component) const

Definition at line 74 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ ValidateParameter()

bool ParameterSchemaRegistry::ValidateParameter ( const std::string &  componentName,
const std::string &  parameterName,
const std::string &  value 
) const

Definition at line 77 of file ParameterSchemaRegistry.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_categoryIndex

std::map<std::string, std::vector<size_t> > Olympe::ParameterSchemaRegistry::m_categoryIndex
private

◆ m_schemaIndex

std::map<std::string, size_t> Olympe::ParameterSchemaRegistry::m_schemaIndex
private

Definition at line 78 of file ParameterSchemaRegistry.h.

Referenced by ClearAllSchemas(), GetSchema(), HasSchema(), and UpdateIndices().

◆ m_schemas

std::vector<ComponentSchema> Olympe::ParameterSchemaRegistry::m_schemas
private

◆ s_instance

ParameterSchemaRegistry * ParameterSchemaRegistry::s_instance = nullptr
staticprivate

Definition at line 82 of file ParameterSchemaRegistry.h.

Referenced by Get().


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