PeerOS

From Ogre Wiki

Jump to: navigation, search

Created by --Occulis 22:29, 30 April 2006 (CDT)

Purpose

The Peer Object Subscriber set of classes help us set up an Observer (aka Publisher-Subscriber) design pattern.

This solves the problem of complex message handling in a large C++ application with many small pieces.

Classes

The three classes making up the PeerOS library are:

  • PeerMessage: Describes ("is a") a message.
  • PeerPublisher: pushes a message down to the subscribers.
  • PeerReader: A subscriber. Will only receive messages from a Publisher to which it has subscribed.

Naming Conventions

  • A class derived from PeerPublisher to publish Foo messages should be named CMPublish_Foo. The "CMPublish" stands for "Class for Message Publishing."
  • A class derived from PeerMessage to represent a Foo message should be named CM_Foo.
  • A class derived from PeerReader to read (aka handle) a Foo message should be named CMRead_Foo.
Personal tools
administration