advice please

From: Noah Roberts (nroberts_at_dontemailme.invalid)
Date: 08/13/04


Date: Fri, 13 Aug 2004 13:03:00 -0700

The problem: Implement a protocol that contains multiple "modes" where
commands and events cause the system to enter a specific mode in which
different sets of commands are available. Some commands are available
in any mode, others result in an error saying disallowed. Some commands
result in different things depending on the mode we are in.

I am thinking that mode is a state and so that pattern fits. I also
have commands parsing themselves and returning command subclasses based
on input (prototype). What I am working on now is who should know more,
the mode or the command. Should commands query the mode and dissalow
themselves, or should the mode querry the command and dissalow it?
Should I generalize the mode interface so that the command can perform
operations or should I have the mode query the command for data
(arguments) and perform the operations? Is there another option I am
not thinking of?

-- 
Our enemies are innovative and resourceful - and so are we
They never stop thinking about new ways to harm our country and our 
people - and neither do we.
    -- George W. Bush
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 100,000 Newsgroups - 19 Different Servers! =-----


Relevant Pages

  • Re: advice please
    ... > different sets of commands are available. ... Should commands query the mode and dissalow ... Study the related set of patterns for this context in the Design ...
    (comp.object)
  • Re: advice please
    ... >different sets of commands are available. ... Should commands query the mode and dissalow ... Object Mentor Inc. ... "The aim of science is not to open the door to infinite wisdom, ...
    (comp.object)
  • Re: [SLE] Wireless Internet at public hotspots -- update
    ... You can create multiple versions, ... You could use the ifdown and ifup commands. ... What I see from ifconfig is that eth1 will show an IP ... > showing me an IP that wasn't really assigned by DHCP? ...
    (SuSE)
  • question regarding cacheline size
    ... This is for PCMCIA version of Silicon Image 3124 SerialATA controller. ... When cacheline size is configured, the controller uses Read Multiple commands. ... The SiI3124, when initiating a read transaction, will issue the Read Multiple PCI command if empty space in its FIFO is greater than the value programmed in this register. ... For all involved commands - memory read line, memory read multiple and memory write and invalidate - a value larger than actual cacheline size doesn't hurt but a smaller value may. ...
    (Linux-Kernel)
  • Re: effing Nader
    ... >>>Typing a few simple commands is much faster than multiple clicks on ... >>>the commands the first time. ... If you're working only with graphics files, ... range of batch processing capabilities, and you can LOOK at the pics too! ...
    (rec.arts.sf.fandom)