Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (38 sloc) 1.164 kB
namespace Rosella.Version
// Private routine to provide a persistant global variable to store
// version numbers in
const string VERSION_HASH_NAME = "Rosella.Version.version_hash";
function get_version_hash()
using Rosella.__PRIVATE_Version.__GET_VERSION_HASH;
return Rosella.Globals.autoget_global(VERSION_HASH_NAME, __GET_VERSION_HASH);
// Get the version string for the specified library. Return null if the
// library is not found.
function get_version(string lib)
var version_hash = get_version_hash();
if (exists version_hash[lib])
return version_hash[lib];
return version_hash["UNKNOWN"];
/* Version object.
Stores information about a library version
class Rosella.Version
var name;
var version_number;
var state;
function Version(var lib, var n, var s)
{ = lib;
self.version_number = n;
self.state = s;
function library_name() { return; }
function library_version() { return self.version_number; }
function library_state() { return self.state; }
Jump to Line
Something went wrong with that request. Please try again.