summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource.cpp
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-02 15:51:41 +0200
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-02 15:51:41 +0200
commit8bff62c335842b4c850cc09716e79c2f556247c7 (patch)
tree281dd5c4a92087f6308e3fb540aba62d7fd272c2 /libresourceqt/src/resource.cpp
parentb7d622788b55d30d51ce30bd58634763fddf66fc (diff)
directory structure changes
Diffstat (limited to 'libresourceqt/src/resource.cpp')
-rw-r--r--libresourceqt/src/resource.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/libresourceqt/src/resource.cpp b/libresourceqt/src/resource.cpp
new file mode 100644
index 0000000..8207b66
--- /dev/null
+++ b/libresourceqt/src/resource.cpp
@@ -0,0 +1,57 @@
+#include "resource.h"
+
+using namespace ResourcePolicy;
+
+Resource::Resource()
+ : optional(false), shared(false),
+ identifier(0), granted(false)
+{
+ identifier = (quint32)this;
+}
+
+Resource::Resource(const Resource &other)
+ : optional(other.optional), shared(other.shared),
+ identifier(other.identifier), granted(other.granted)
+{
+}
+
+Resource::~Resource()
+{
+}
+
+bool Resource::isOptional() const
+{
+ return optional;
+}
+
+void Resource::setOptional(bool resourceIsOptional)
+{
+ optional = resourceIsOptional;
+}
+
+bool Resource::isShared() const
+{
+ return shared;
+}
+
+void Resource::setShared(bool shared)
+{
+ this->shared = shared;
+}
+
+bool Resource::isGranted() const
+{
+ return granted;
+}
+
+void Resource::setGranted()
+{
+ granted = true;
+}
+
+void Resource::unsetGranted()
+{
+ granted = false;
+}
+
+