]> granicus.if.org Git - graphviz/commitdiff
gvc++: add GVContext::version()
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 7 Mar 2022 12:32:07 +0000 (13:32 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 16 Aug 2022 10:21:45 +0000 (12:21 +0200)
CHANGELOG.md
lib/gvc++/GVContext.cpp
lib/gvc++/GVContext.h

index e6fad005106fdd293090363a0ccca8e0c0697356..29c422c2217b80ad0ff51e424c41a5105fca7b7d 100644 (file)
@@ -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
index e7f750348b8bf3f5cef94fa9da507521b4639db7..b5ab5150b4b32fde4f5722d2a180ecce172b8068 100644 (file)
@@ -15,4 +15,6 @@ GVContext::~GVContext() {
   gvFreeContext(m_gvc);
 }
 
+std::string_view GVContext::version() const { return gvcVersion(m_gvc); }
+
 } // namespace GVC
index d7494d82ea3df3126189a1aa4da742a1b5357059..4f42e07c11e9f4ad6e34b2c0fe71a6d14a4bacbc 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 
+#include <string_view>
 #include <utility>
 
 #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;