From: Magnus Jacobsson Date: Mon, 7 Mar 2022 12:32:07 +0000 (+0100) Subject: gvc++: add GVContext::version() X-Git-Tag: 5.0.1~7^2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44397fb9f8caf56c08c9bce58f825bedba9cff4b;p=graphviz gvc++: add GVContext::version() --- diff --git a/CHANGELOG.md b/CHANGELOG.md index e6fad0051..29c422c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Generated SVG files no longer use `transparent` paint or color as this keyword does not exist in SVG 1.1, and instead use `none` or a zero-opacity color. +### Added + - GVContext::version() to lib/gvc++ + ## [5.0.0] – 2022-07-07 ### Changed diff --git a/lib/gvc++/GVContext.cpp b/lib/gvc++/GVContext.cpp index e7f750348..b5ab5150b 100644 --- a/lib/gvc++/GVContext.cpp +++ b/lib/gvc++/GVContext.cpp @@ -15,4 +15,6 @@ GVContext::~GVContext() { gvFreeContext(m_gvc); } +std::string_view GVContext::version() const { return gvcVersion(m_gvc); } + } // namespace GVC diff --git a/lib/gvc++/GVContext.h b/lib/gvc++/GVContext.h index d7494d82e..4f42e07c1 100644 --- a/lib/gvc++/GVContext.h +++ b/lib/gvc++/GVContext.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "gvc.h" @@ -54,6 +55,8 @@ public: // get a non-owning pointer to the underlying C data structure GVC_t *c_struct() const { return m_gvc; } + std::string_view version() const; + private: // the underlying C data structure GVC_t *m_gvc = nullptr;