diff --git a/pglablib/codebuilder/LanguageConfig.cpp b/pglablib/codebuilder/LanguageConfig.cpp index 3d22eed..33100f8 100644 --- a/pglablib/codebuilder/LanguageConfig.cpp +++ b/pglablib/codebuilder/LanguageConfig.cpp @@ -13,3 +13,38 @@ QString LanguageConfig::getTypeName(Oid dbtype) const { return m_typeMappings->getTypeForOid(dbtype); } + +void LanguageConfig::setNameManglingRules(std::shared_ptr name_mangling_rules) +{ + m_varNaming = name_mangling_rules; +} + +std::shared_ptr LanguageConfig::typeMappings() const +{ + return m_typeMappings; +} + +void LanguageConfig::setTypeMappings(std::shared_ptr type_mappings) +{ + m_typeMappings = type_mappings; +} + +std::shared_ptr LanguageConfig::structureTemplate() const +{ + return m_structureTemplate; +} + +void LanguageConfig::setStructureTemplate(std::shared_ptr structure_template) +{ + m_structureTemplate = structure_template; +} + +std::shared_ptr LanguageConfig::indentationConfig() const +{ + return m_indentationConfig; +} + +void LanguageConfig::setIndentationConfig(std::shared_ptr indentation_config) +{ + m_indentationConfig = indentation_config; +} diff --git a/pglablib/codebuilder/LanguageConfig.h b/pglablib/codebuilder/LanguageConfig.h index e583a28..3f9ac46 100644 --- a/pglablib/codebuilder/LanguageConfig.h +++ b/pglablib/codebuilder/LanguageConfig.h @@ -18,36 +18,13 @@ public: QString columnNameToFieldName(const QString& column_name) const; QString getTypeName(Oid dbtype) const; - void setNameManglingRules(std::shared_ptr name_mangling_rules) - { - m_varNaming = name_mangling_rules; - } - - std::shared_ptr typeMappings() const { return m_typeMappings; } - void setTypeMappings(std::shared_ptr type_mappings) - { - m_typeMappings = type_mappings; - } - - std::shared_ptr structureTemplate() const - { - return m_structureTemplate; - } - - void setStructureTemplate(std::shared_ptr structure_template) - { - m_structureTemplate = structure_template; - } - - std::shared_ptr indentationConfig() const - { - return m_indentationConfig; - } - - void setIndentationConfig(std::shared_ptr indentation_config) - { - m_indentationConfig = indentation_config; - } + void setNameManglingRules(std::shared_ptr name_mangling_rules); + std::shared_ptr typeMappings() const; + void setTypeMappings(std::shared_ptr type_mappings); + std::shared_ptr structureTemplate() const; + void setStructureTemplate(std::shared_ptr structure_template); + std::shared_ptr indentationConfig() const; + void setIndentationConfig(std::shared_ptr indentation_config); private: /** Default template for declaring a variable of the correct type. * exmaple: "{$type} {$varname};"