summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource.cpp
blob: fe1153e303ee1a978d598b94722ce103a6d8a336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <policy/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;
}