Skip to content

Basic C observer for Object Oriented C programming

Notifications You must be signed in to change notification settings

fetiu/c-observer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C Observer

basic implementation of Observer Pattern in C.

How to run

gem install ceedling
ceedling test:observer

How to use

To add Observable property to certain object,

  1. Place Observable type as the first field of your sturct.
  2. Call Observable_init to activate
  3. If some module wants to be notified, register appropriate handler with Observable_attach
  4. Now that will make anything can be updated when Observable_notify called.

See test/test_observable.c for example.

About

Basic C observer for Object Oriented C programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages