ioevents.rb

Path: lib/mues/events/ioevents.rb  (CVS)
Last Update: Sat Aug 18 22:54:10 -0700 2007

This file contains event classes that are used for sending input or output to and from objects within the MUES::Engine.

The event classes defined in this file are:

MUES::IOEvent
An abstract base class for Input/Output events.
MUES::OutputEvent
An output event class.
MUES::InputEvent
An input event class.
MUES::IOControlOutputEvent
Abstract OutputEvent class for special output.
MUES::PromptEvent
Output event class for prompting a user.
MUES::HiddenInputPromptEvent
Prompt event class for prompting a user and hiding the resultant input.
MUES::DebugOutputEvent
Output event class for events that carry debugging information.
MUES::ErrorOutputEvent
Output event class for events that carry error information.
MUES::FormattedOutputEvent
Output event for data which contains formatting tags.
MUES::WrappedOutputEvent
Output event for data which should be wrapped to the output device‘s width.
MUES::PagedOutputEvent
Output event for data which should be paged.
MUES::TabularOutputEvent
Output event for tabular data.

Synopsis

  require 'mues/mixins'
  require 'mues/events'

  include MUES::ServerFunctions

  # Send a broadcast to all OutputEvent receivers
  engine.dispatchEvents( OuputEvent.new "The server is shutting down." )

To Do

  • Most of the little classes in this file will eventually be replaced by more intelligent OutputEvent class and one or more Strategies (ala the Strategy Design Pattern from the GoF book) that add additional features for those OutputEventFilters that grok them. This will perhaps eventually look like:
        outputEvent = OutputEvent::new( content, :wrapped, :paged, :formatted )
    

    The output-sided IOEventFilters would then be free to implement (or not) any capability they

Subversion ID

$Id: ioevents.rb 1206 2004-05-09 21:25:11Z deveiant $

Authors

  • Michael Granger <ged@FaerieMUD.org>

Copyright

Copyright (c) 2000-2003 The FaerieMUD Consortium. All rights reserved.

This module is free software. You may use, modify, and/or redistribute this software under the terms of the Perl Artistic License. (See language.perl.com/misc/Artistic.html)

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Required files

strscan   mues/object   mues/exceptions   mues/events/event  

[Validate]