From a45917bce4f35792d9cf1943cf3316e12ea55523 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Sun, 18 Mar 2018 14:47:17 -0400 Subject: Add api for getting total string output size of QualifiedName object --- type.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'type.cpp') diff --git a/type.cpp b/type.cpp index 08b64713..0a91ae92 100644 --- a/type.cpp +++ b/type.cpp @@ -188,6 +188,15 @@ size_t QualifiedName::size() const } +size_t QualifiedName::StringSize() const +{ + size_t size = 0; + for (auto& name : m_name) + size += name.size() + 2; + return size - 2; +} + + string QualifiedName::GetString() const { bool first = true; -- cgit v1.3.1