From 758bd4909f1cbe7e0d0843a62634caa8bbf1de4d Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Wed, 24 Nov 2021 13:20:25 +0100 Subject: [PATCH] ModelContainerWrapper: added size() method --- src/modelcontainerwrapper.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/modelcontainerwrapper.h b/src/modelcontainerwrapper.h index 2a6762b..a09fc27 100644 --- a/src/modelcontainerwrapper.h +++ b/src/modelcontainerwrapper.h @@ -55,11 +55,16 @@ public: return nullptr; } - virtual bool is_container_empty() + virtual bool is_container_empty() const { return true; } + virtual size_t size() const + { + return 0; + } + virtual void increment_iterator() { } @@ -84,11 +89,16 @@ public: iterator = container->end(); } - bool is_container_empty() + bool is_container_empty() const { return container->empty(); } + size_t size() const + { + return container->size(); + } + void increment_iterator() { if( iterator == container->end() )