Display number of included/DB models in "1st model set wizard"

This commit is contained in:
Klaus Basan
2019-01-02 08:50:35 +01:00
committed by Mat Sutcliffe
parent 2de192600f
commit 7be54fde87
5 changed files with 37 additions and 3 deletions

View File

@@ -224,16 +224,22 @@ namespace BlackMisc
}
template<class OBJ, class CONTAINER, typename KEYTYPE>
int IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::countWithValidDbKey() const
int IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::countWithValidDbKey(bool withKey) const
{
int count = 0;
for (const OBJ &obj : ITimestampObjectList<OBJ, CONTAINER>::container())
{
if (obj.hasValidDbKey()) { count++; }
if (obj.hasValidDbKey() && withKey) { count++; }
}
return count;
}
template<class OBJ, class CONTAINER, typename KEYTYPE>
int IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::countWithValidDbKey() const
{
return this->countWithValidDbKey(true);
}
template<class OBJ, class CONTAINER, typename KEYTYPE>
bool IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::containsAnyObjectWithoutKey() const
{