Thread: I believe I've found an official Answer to my Problem (Object Factories)

  1. #61
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Would inheriting from MessageSystem solve the problem to have them use the default handler unless defined? might be kind of illogical though.
    Scratch that. It's really stupid and illogical to do that for every class just to use the default handler. Lemme know if you figure out a way without macro magic.

    but I found if I was retrieving Object's from an ObjectSystem then there would be no use for a functor
    Scratch that. I see why the functor was necessary, since it might not always be Object's you're working with. I just missed that because you went off talking about Object's.


    I'm still unclear on the handler using a switch or not, and how to pass MSG_FIRE instead of a number - that require either a macro, global const, or global enum?

    EDIT: I guess if the message system was that robust there would be a global enum or enum in the handler class or something.

    EDIT: Found a nice powerpoint on scripting: http://www.cmpevents.com/sessions/GD...sy_UPDATED.ppt

    Use script handlers
    - For flexibility and prototyping
    - To avoid C++ dependencies
    - Reduce C++ subclasses

    Use C++ handlers
    - For special arg handling
    - Performance, maintainance
    It answered my question on how to handle a special amount of arguments and a few other things. Still though, I have a lot to learn before I can impliment this message system or scripting system.
    Last edited by Dae; 12-21-2005 at 05:24 PM.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using this as synchronization object
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 03-22-2008, 07:49 AM
  2. problem with answer going to default?
    By Patrick1234 in forum C++ Programming
    Replies: 4
    Last Post: 10-02-2002, 09:11 AM
  3. slight problem just can't see the answer
    By anthonye in forum C++ Programming
    Replies: 1
    Last Post: 07-05-2002, 08:45 AM
  4. I've ran into a problem
    By Mike Jones in forum C Programming
    Replies: 1
    Last Post: 03-27-2002, 04:08 PM
  5. code help :)
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 02-28-2002, 01:12 PM