Lot of code for generating code. Working on unit tests.
This commit is contained in:
parent
da45929b12
commit
8f4845d4d2
42 changed files with 1089 additions and 267 deletions
|
|
@ -24,6 +24,8 @@ class PgContainer: public IPgContainter {
|
|||
public:
|
||||
using t_Container = std::vector<T>; ///< Do not assume it will stay a vector only expect bidirectional access
|
||||
|
||||
PgContainer() = default;
|
||||
|
||||
explicit PgContainer(std::weak_ptr<PgDatabaseCatalog> cat)
|
||||
: m_catalogue(cat)
|
||||
{}
|
||||
|
|
@ -87,6 +89,13 @@ public:
|
|||
|
||||
std::sort(m_container.begin(), m_container.end());
|
||||
}
|
||||
|
||||
// Meant for mocking during testing
|
||||
void add(const T &elem)
|
||||
{
|
||||
m_container.push_back(elem);
|
||||
std::sort(m_container.begin(), m_container.end());
|
||||
}
|
||||
protected:
|
||||
std::weak_ptr<PgDatabaseCatalog> m_catalogue;
|
||||
t_Container m_container;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue