From a37be5231b1d555982b1399a596b6ec29f3c7363 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Sun, 17 Sep 2006 22:22:18 +0000 Subject: [PATCH] - Add some comments git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1266 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/sgpemv2/global_preferences.hh | 1 - src/backend/sgpemv2/resource.hh | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/backend/sgpemv2/global_preferences.hh b/src/backend/sgpemv2/global_preferences.hh index f023465..2e99fbc 100644 --- a/src/backend/sgpemv2/global_preferences.hh +++ b/src/backend/sgpemv2/global_preferences.hh @@ -155,7 +155,6 @@ namespace sgpem -# Via command line arguments -# By a backend::Plugin::on_init() method called when loading an external DSO. This is perfectly normal and permitted. */ - int _speed; }; } diff --git a/src/backend/sgpemv2/resource.hh b/src/backend/sgpemv2/resource.hh index f803a63..cd80aa8 100644 --- a/src/backend/sgpemv2/resource.hh +++ b/src/backend/sgpemv2/resource.hh @@ -29,16 +29,31 @@ namespace sgpem class Resource; class SerializeVisitor; + /** \brief An abstract class representing a resource + * + * A resource in a real operating system could be a printer, + * a socket, a chunk of memory, or a simple file. + */ class SG_DLLEXPORT Resource { public: virtual ~Resource(); + /** \brief See if two different states point to the same resource */ virtual bool operator==(const Resource& op2) const = 0; + /** \brief Returns the resource name */ virtual Glib::ustring get_name() const = 0; + + /** \brief Return the number of places this resource has available + * before becoming unavailable + * + * E.g. if a resource has two places, it can fulfill only two + * ::SubRequests at each instant + */ virtual unsigned int get_places() const = 0; + /** \brief Used to serialize the informations of this entity */ virtual void serialize(SerializeVisitor& translator) const = 0; };