File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ class LIBSCRATCHCPP_EXPORT ScratchConfiguration
4040 static void removeGraphicsEffect (const std::string &name);
4141 static IGraphicsEffect *getGraphicsEffect (const std::string &name);
4242
43+ static const std::string &version ();
44+ static int majorVersion ();
45+ static int minorVersion ();
46+ static int patchVersion ();
47+
4348 private:
4449 static const std::vector<std::shared_ptr<IExtension>> getExtensions ();
4550
Original file line number Diff line number Diff line change @@ -49,6 +49,31 @@ IGraphicsEffect *ScratchConfiguration::getGraphicsEffect(const std::string &name
4949 return it->second .get ();
5050}
5151
52+ /* ! Returns the version string of the library. */
53+ const std::string &ScratchConfiguration::version ()
54+ {
55+ static const std::string ret = LIBSCRATCHCPP_VERSION;
56+ return ret;
57+ }
58+
59+ /* ! Returns the major version of the library. */
60+ int ScratchConfiguration::majorVersion ()
61+ {
62+ return LIBSCRATCHCPP_VERSION_MAJOR;
63+ }
64+
65+ /* ! Returns the minor version of the library. */
66+ int ScratchConfiguration::minorVersion ()
67+ {
68+ return LIBSCRATCHCPP_VERSION_MINOR;
69+ }
70+
71+ /* ! Returns the patch version of the library. */
72+ int ScratchConfiguration::patchVersion ()
73+ {
74+ return LIBSCRATCHCPP_VERSION_PATCH;
75+ }
76+
5277const std::vector<std::shared_ptr<IExtension>> ScratchConfiguration::getExtensions ()
5378{
5479 return impl->extensions ;
You can’t perform that action at this time.
0 commit comments