void BindArgument(DataCommand *command, ArgumentIndex index, const DPL::String& argument);
void BindArgument(DataCommand *command, ArgumentIndex index, const OptionalString& argument);
}
-class Expression {
+class __attribute__ ((visibility("hidden"))) Expression {
public:
virtual ~Expression() {}
virtual std::string GetString() const = 0;
typedef DPL::SharedPtr<Expression> ExpressionPtr;
template<const char* Operator, typename LeftExpression, typename RightExpression>
-class BinaryExpression : public Expression {
+class __attribute__ ((visibility("hidden"))) BinaryExpression : public Expression {
protected:
LeftExpression m_leftExpression;
RightExpression m_rightExpression;
}
template<typename ArgumentType>
-class ExpressionWithArgument : public Expression {
+class __attribute__ ((visibility("hidden"))) ExpressionWithArgument : public Expression {
protected:
ArgumentType argument;
}
};
-
template<typename ColumnData, const char* Relation>
-class Compare : public ExpressionWithArgument<typename ColumnData::ColumnType> {
+class __attribute__ ((visibility("hidden"))) Compare : public ExpressionWithArgument<typename ColumnData::ColumnType> {
public:
explicit Compare(typename ColumnData::ColumnType column) :
ExpressionWithArgument<typename ColumnData::ColumnType>(column)
};
#define ORM_DEFINE_COMPARE_EXPRESSION(name, relationType) \
template<typename ColumnData> \
- class name : public Compare<ColumnData, RelationTypes::relationType> { \
+ class __attribute__ ((visibility("hidden"))) name : public Compare<ColumnData, RelationTypes::relationType> { \
public: \
name(typename ColumnData::ColumnType column) : \
Compare<ColumnData, RelationTypes::relationType>(column) \
ORM_DEFINE_COMPARE_EXPRESSION(Is, Is)
template<typename ColumnData1, typename ColumnData2>
-class CompareBinaryColumn {
+class __attribute__ ((visibility("hidden"))) CompareBinaryColumn {
private:
std::string m_relation;
public:
}
template<typename ColumnData, const char* Relation>
-class NumerousArguments : public Expression {
+class __attribute__ ((visibility("hidden"))) NumerousArguments : public Expression {
protected:
std::set<typename ColumnData::ColumnType> m_argumentList;
public:
#define ORM_DEFINE_COMPARE_EXPRESSION_NUMEROUS_ARGUMENTS(name, relationType) \
template<typename ColumnData> \
- class name : public NumerousArguments<ColumnData, RelationTypes::relationType> { \
+ class __attribute__ ((visibility("hidden"))) name : public NumerousArguments<ColumnData, RelationTypes::relationType> { \
public: \
name(std::set<typename ColumnData::ColumnType> column) : \
NumerousArguments<ColumnData, RelationTypes::relationType>(column) \
template<typename ColumnType>
ColumnType GetColumnFromCommand(ColumnIndex columnIndex, DataCommand *command);
-class CustomColumnBase {
+class __attribute__ ((visibility("hidden"))) CustomColumnBase {
public:
CustomColumnBase() {}
virtual ~CustomColumnBase() {}
};
template<typename ColumnType>
-class CustomColumn : public CustomColumnBase {
+class __attribute__ ((visibility("hidden"))) CustomColumn : public CustomColumnBase {
private:
ColumnType m_columnData;
};
template<typename ColumnList>
-class CustomRowUtil {
+class __attribute__ ((visibility("hidden"))) CustomRowUtil {
public:
static void MakeColumnList(std::vector<CustomColumnBase*>& columnList)
{
};
template<>
-class CustomRowUtil<DPL::TypeListGuard> {
+class __attribute__ ((visibility("hidden"))) CustomRowUtil<DPL::TypeListGuard> {
public:
static void MakeColumnList(std::vector<CustomColumnBase*>&) {}
private:
};
template<typename ColumnList>
-class CustomRow {
+class __attribute__ ((visibility("hidden"))) CustomRow {
private:
std::vector<CustomColumnBase*> m_columns;
}
template<typename ColumnList, typename CustomRow>
-class FillCustomRowUtil {
+class __attribute__ ((visibility("hidden"))) FillCustomRowUtil {
public:
static void FillCustomRow(CustomRow& row, DataCommand* command)
{
};
template<typename CustomRow>
-class FillCustomRowUtil<DPL::TypeListGuard, CustomRow> {
+class __attribute__ ((visibility("hidden"))) FillCustomRowUtil<DPL::TypeListGuard, CustomRow> {
private:
static void FillCustomRow(CustomRow&, ColumnIndex, DataCommand *)
{ /* do nothing, we're past the last element of column list */ }
};
template<typename ColumnList, typename Row>
-class FillRowUtil {
+class __attribute__ ((visibility("hidden"))) FillRowUtil {
public:
static void FillRow(Row& row, DataCommand *command)
{
};
template<typename Row>
-class FillRowUtil<DPL::TypeListGuard, Row> {
+class __attribute__ ((visibility("hidden"))) FillRowUtil<DPL::TypeListGuard, Row> {
private:
static void FillRow(Row&, ColumnIndex, DataCommand *)
{ /* do nothing, we're past the last element of column list */ }
};
template<typename ColumnList>
-class JoinUtil {
+class __attribute__ ((visibility("hidden"))) JoinUtil {
public:
static std::string GetColumnNames()
{
};
template<>
-class JoinUtil<DPL::TypeListGuard> {
+class __attribute__ ((visibility("hidden"))) JoinUtil<DPL::TypeListGuard> {
public:
static std::string GetColumnNames() { return ""; }
static std::string GetJoinTableName(std::string) { return ""; }
};
template<typename TableDefinition>
-class Query
+class __attribute__ ((visibility("hidden"))) Query
{
protected:
explicit Query(IOrmInterface* interface) :
};
template<typename TableDefinition>
-class QueryWithWhereClause : public Query<TableDefinition>
+class __attribute__ ((visibility("hidden"))) QueryWithWhereClause : public Query<TableDefinition>
{
protected:
ExpressionPtr m_whereExpression;
};
template<typename TableDefinition>
-class Delete : public QueryWithWhereClause<TableDefinition>
+class __attribute__ ((visibility("hidden"))) Delete : public QueryWithWhereClause<TableDefinition>
{
protected:
void Prepare()
}
};
+namespace {
+class BindVisitor {
+private:
+ DataCommand *m_command;
+public:
+ ArgumentIndex m_bindArgumentIndex;
+
+ BindVisitor(DataCommand *command) :
+ m_command(command),
+ m_bindArgumentIndex(1)
+ {}
+
+ template<typename ColumnType>
+ void Visit(const char*, const ColumnType& value, bool isSet)
+ {
+ if ( isSet )
+ {
+ DataCommandUtils::BindArgument(m_command, m_bindArgumentIndex, value);
+ m_bindArgumentIndex++;
+ }
+ }
+};
+} //anonymous namespace
template<typename TableDefinition>
-class Insert : public Query<TableDefinition>
+class __attribute__ ((visibility("hidden"))) Insert : public Query<TableDefinition>
{
public:
typedef typename TableDefinition::Row Row;
}
}
- class BindVisitor {
- private:
- DataCommand *m_command;
- ArgumentIndex m_bindArgumentIndex;
- public:
- BindVisitor(DataCommand *command) :
- m_command(command),
- m_bindArgumentIndex(1)
- {}
-
- template<typename ColumnType>
- void Visit(const char*, const ColumnType& value, bool isSet)
- {
- if ( isSet )
- {
- DataCommandUtils::BindArgument(m_command, m_bindArgumentIndex, value);
- m_bindArgumentIndex++;
- }
- }
- };
-
void Bind()
{
BindVisitor visitor(this->m_command);
};
template<typename TableDefinition>
-class Select : public QueryWithWhereClause<TableDefinition>
+class __attribute__ ((visibility("hidden"))) Select : public QueryWithWhereClause<TableDefinition>
{
public:
typedef typename TableDefinition::ColumnList ColumnList;
};
template<typename TableDefinition>
-class Update : public QueryWithWhereClause<TableDefinition> {
+class __attribute__ ((visibility("hidden"))) Update : public QueryWithWhereClause<TableDefinition> {
public:
typedef typename TableDefinition::Row Row;
}
}
- class BindVisitor {
- private:
- DataCommand *m_command;
-
- public:
- ArgumentIndex m_bindArgumentIndex;
-
- BindVisitor(DataCommand *command) :
- m_command(command),
- m_bindArgumentIndex(1)
- {}
-
- template<typename ColumnType>
- void Visit(const char*, const ColumnType& value, bool isSet)
- {
- if ( isSet )
- {
- DataCommandUtils::BindArgument(m_command, m_bindArgumentIndex, value);
- m_bindArgumentIndex++;
- }
- }
- };
-
void Bind()
{
BindVisitor visitor(this->m_command);