pgLab/pglablib/codebuilder/LanguageConfig.h

46 lines
1.4 KiB
C++

#ifndef LANGUAGECONFIG_H
#define LANGUAGECONFIG_H
#include <QString>
#include "Pgsql_oids.h"
class NameManglingRules;
class TypeMappings;
class StructureTemplate;
class IndentationConfig;
/**
*
*/
class LanguageConfig {
public:
LanguageConfig();
QString columnNameToFieldName(const QString& column_name) const;
QString getTypeName(Oid dbtype) const;
void setNameManglingRules(std::shared_ptr<const NameManglingRules> name_mangling_rules);
std::shared_ptr<const TypeMappings> typeMappings() const;
void setTypeMappings(std::shared_ptr<const TypeMappings> type_mappings);
std::shared_ptr<const StructureTemplate> structureTemplate() const;
void setStructureTemplate(std::shared_ptr<const StructureTemplate> structure_template);
std::shared_ptr<const IndentationConfig> indentationConfig() const;
void setIndentationConfig(std::shared_ptr<const IndentationConfig> indentation_config);
private:
/** Default template for declaring a variable of the correct type.
* exmaple: "{$type} {$varname};"
*/
//QString varDeclTemplate;
std::shared_ptr<const NameManglingRules> m_varNaming;
std::shared_ptr<const TypeMappings> m_typeMappings;
std::shared_ptr<const StructureTemplate> m_structureTemplate;
std::shared_ptr<const IndentationConfig> m_indentationConfig;
enum class VariableStrategy {
UseLocalVariables,
DeclareClass
};
};
#endif // LANGUAGECONFIG_H