~ubuntu-branches/ubuntu/raring/openwalnut/raring

« back to all changes in this revision

Viewing changes to src/core/common/WSharedObject.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Eichelbaum
  • Date: 2012-12-12 11:26:32 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20121212112632-xhiuwkxuz5h0idkh
Tags: 1.3.1+hg5849-1
* Minor changes compared to 1.3.0 but included several bug fixes.
* See http://www.openwalnut.org/versions/4

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
class WSharedObject
42
42
{
43
43
public:
44
 
 
45
44
    /**
46
45
     * Default constructor.
47
46
     */
53
52
    virtual ~WSharedObject();
54
53
 
55
54
    /**
 
55
     * The type protected by this shared object class
 
56
     */
 
57
    typedef T ValueT;
 
58
 
 
59
    /**
56
60
     * Type for read tickets.
57
61
     */
58
62
    typedef boost::shared_ptr< WSharedObjectTicketRead< T > > ReadTicket;
63
67
    typedef boost::shared_ptr< WSharedObjectTicketWrite< T > > WriteTicket;
64
68
 
65
69
    /**
 
70
     * Shared pointer abbreviation.
 
71
     */
 
72
    typedef boost::shared_ptr< WSharedObject< T > > SPtr;
 
73
 
 
74
    /**
 
75
     * Const shared ptr abbreviation.
 
76
     */
 
77
    typedef boost::shared_ptr< WSharedObject< T > > ConstSPtr;
 
78
 
 
79
    /**
66
80
     * Returns a ticket to get read access to the contained data. After the ticket is freed, the read lock vanishes.
67
81
     *
68
82
     * \return the read ticket
86
100
    boost::shared_ptr< WCondition > getChangeCondition() const;
87
101
 
88
102
protected:
89
 
 
90
103
    /**
91
104
     * The object wrapped by this class. This member is mutable as the \ref getReadTicket and \ref getWriteTicket functions are const but need a
92
105
     * non-const reference to m_object.