Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
|
#include <CLogicsAllowed.hpp>
Classes | |
struct | SBlockData |
struct | SPrvDBVersion |
Public Types | |
typedef std::map< iv::logic::ParamId, std::string > | TMapDBBlockParamNStr |
typedef std::map< iv::logic::eDBBlockParamType, uint8_t > | TMapDBBlockParamSize |
typedef std::map< uint32_t, std::string > | TMapBlockTypeDescription |
typedef std::map< iv::logic::LogicBlockId, SBlockData > | TMapBlockSubTypeData |
Public Member Functions | |
uint8_t | blockExtraSize (uint32_t blockType, uint32_t blockSubType) const |
std::string | blockName (uint32_t blockType, uint32_t blockSubType) const |
TMapDBBlockParamNStr | blockParamsDesc (uint32_t blockType, uint32_t blockSubType) const |
uint8_t | blockSize (uint32_t blockType, uint32_t blockSubType) const |
std::string | dbVersion () const |
bool | loadData () |
bool | isAllowedSubtypeInLOM (uint32_t idLOM, uint32_t idSubtype) |
bool | isEmpty () const |
TMapBlockSubTypeData | getBlockSubTypes () const |
TMapBlockTypeDescription | getBlockTypesDesc () const |
const std::string & | getErrorText () const |
const TMapDBBlockParamSize & | getParamSizes () const |
bool | isDataLoadedOk () const |
void | eraseSubType (iv::logic::LogicBlockId pairTypeSubType) |
void | collapseTreeStructure () |
virtual | ~CLogicsAllowed ()=default |
CLogicsAllowed () | |
Static Public Member Functions | |
static iv::logic::eDBBlockParamType | enumDBBlockParamType (std::string_view strType) |
static std::string_view | strDBBlockParamType (iv::logic::eDBBlockParamType type) |
static std::string | getDefaultParameterValue (iv::logic::eDBBlockParamType paramType) |
static std::optional< std::string > | getSpecificDefaultParameterValue (iv::logic::LogicBlockId blockId, iv::logic::ParamId paramId) |
static bool | isEditableDBBlockParam (iv::logic::eDBBlockParamType type) |
static bool | allowsExternalDescriptionDBBlockParam (iv::logic::eDBBlockParamType type) |
static bool | allowsParameterOnlineDBBlockParam (iv::logic::eDBBlockParamType type) |
static CLogicsAllowed & | getInstance () |
Private Member Functions | |
void | prvReadTable (const std::string &tableName) |
void | prvExtractBlockParams () |
void | prvExtractBlockParamsSize () |
void | prvExtractBlockSubTypeParams (uint32_t blockType, uint32_t blockSubType) |
void | prvExtractBlockSubTypes () |
void | prvExtractBlockTypes () |
void | prvExtractVersion () |
void | prvExtractBlockAllowedSubTypes () |
void | prvCalculateAndStoreBlocksSize () |
void | prvCalculateAndStoreData () |
Private Attributes | |
bool | m_isDataLoadedOk {} |
std::string | m_errorText {} |
SPrvDBVersion | m_dbVersion {} |
TMapDBBlockParamSize | m_mapBlockParamSize {} |
TMapBlockTypeDescription | m_mapBlockTypesDesc {} |
TMapBlockSubTypeData | m_mapBlockSubTypesData {} |
std::set< std::pair< uint32_t, uint32_t > > | m_setIdTypeLOMIdSubtype {} |
Singleton class interface between the data source (CPathResources::getPathDefParamsDatabaseEditorDiamar() for the moment) and the logics editor. It will read the data needed by the editor and will provide methods to retrieve it. The data obtained from this class will limit the logic components allowed to be used in the editor.
NOTE: SQL syntax allowed by 'mdbtools' is very limited, thus more code than usual will be needed to obtain the information we need from the database.
std::map<uint32_t, std::string> CLogicsAllowed::TMapBlockTypeDescription |
std::map<iv::logic::ParamId, std::string> CLogicsAllowed::TMapDBBlockParamNStr |
std::map<iv::logic::eDBBlockParamType, uint8_t> CLogicsAllowed::TMapDBBlockParamSize |
|
virtualdefault |
CLogicsAllowed::CLogicsAllowed | ( | ) |
|
static |
|
static |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
void CLogicsAllowed::collapseTreeStructure | ( | ) |
|
nodiscard |
|
static |
void CLogicsAllowed::eraseSubType | ( | iv::logic::LogicBlockId | pairTypeSubType | ) |
|
nodiscard |
Obtains a map whose key is a pair holding the block's type and subtype, and whose value is the name of the block.
|
nodiscard |
|
static |
|
nodiscard |
|
static |
|
nodiscard |
|
static |
bool CLogicsAllowed::isAllowedSubtypeInLOM | ( | uint32_t | idLOM, |
uint32_t | idSubtype ) |
|
nodiscard |
|
static |
bool CLogicsAllowed::isEmpty | ( | ) | const |
bool CLogicsAllowed::loadData | ( | ) |
Returns true if data loaded successfully; false otherwise. Updates status (m_isOk and m_errorText).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |