Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added static version and copyright methods

  • Loading branch information...
commit 83493fc37c5bde331560fcc1c9c621373080453d 1 parent 468d3d5
@dajobe authored
Showing with 58 additions and 0 deletions.
  1. +48 −0 src/World.cpp
  2. +10 −0 src/World.hpp
View
48 src/World.cpp
@@ -106,4 +106,52 @@ namespace Redland {
throw Exception("Set world feature " + f->str() + " failed");
}
+
+ const string World::shortCopyrightString() const
+ {
+ return librdf_short_copyright_string;
+ }
+
+
+ const string World::copyrightString() const
+ {
+ return librdf_copyright_string;
+ }
+
+
+ const string World::versionString() const
+ {
+ return librdf_version_string;
+ }
+
+
+ int World::versionMajor() const
+ {
+ return librdf_version_major;
+ }
+
+
+ int World::versionMinor() const
+ {
+ return librdf_version_minor;
+ }
+
+
+ int World::versionRelease() const
+ {
+ return librdf_version_release;
+ }
+
+
+ int World::versionDecimal() const
+ {
+ return librdf_version_decimal;
+ }
+
+
+ std::ostream& operator<< (std::ostream& os, const World& world)
+ {
+ return os << "Redland " + world.versionString();
+ }
+
} // namespace Redland
View
10 src/World.hpp
@@ -50,6 +50,14 @@ namespace Redland {
Node* feature(Uri* feature) throw(Exception);
void setFeature(Uri* feature, Node* value) throw(Exception);
+ const string shortCopyrightString() const;
+ const string copyrightString() const;
+ const string versionString() const;
+ int versionMajor() const;
+ int versionMinor() const;
+ int versionRelease() const;
+ int versionDecimal() const;
+
protected:
string error_;
@@ -63,6 +71,8 @@ namespace Redland {
friend class Serializer;
friend class Storage;
friend int redland_world_log_handler(void *user_data, librdf_log_message *log);
+ friend std::ostream& operator<< (std::ostream& os, const World& world);
+
};
Please sign in to comment.
Something went wrong with that request. Please try again.