Ignore:
Timestamp:
Oct 30, 2015, 11:43:01 AM (10 years ago)
Author:
Frederik Heber <heber@…>
Children:
e24dde
Parents:
1b5188
git-author:
Frederik Heber <heber@…> (06/19/15 22:28:24)
git-committer:
Frederik Heber <heber@…> (10/30/15 11:43:01)
Message:

Added new pattern ObservedValue, contrary to Cacheable.

  • essentially updates immediately and caches a value for off-line use, safe- guard with mutexes.
  • added unit test for ObservedValue.
  • factored threeNumbers stub out of CacheableUnitTest, also used the stub in ObservedValueUnitTest.
  • we may now signOn() to Notification with a priority.
  • Cacheable can also update now via notification channels not just for global updates.
  • Observable can now also instantiate the channels directly if given a list. This was necessary as Cacheable or ObservedValue are instantiated in the constructor, too, and if listening to channels, these must already be present.
  • FIX: Channels::addChannels() used NDEBUG wrong way round.
  • ObservedValue::get() returns reference.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodePatterns/Observer/Relay.hpp

    r1b5188 r454bc54  
    4040  virtual void signOff(Observer *target) const;
    4141
    42   virtual void signOn(Observer *target, size_t channelno) const;
     42  virtual void signOn(Observer *target, size_t channelno, PriorityLevel priority = Observable::PriorityDefault) const;
    4343
    4444  virtual void signOff(Observer *target, size_t channelno) const;
Note: See TracChangeset for help on using the changeset viewer.