sirctseb / Scope

Soar coping model
1 stars 0 forks source link

encapsulate command handlers into classes #32

Open sirctseb opened 12 years ago

sirctseb commented 12 years ago
public interface CommandHandler
{
    public string CommandType { get; }
    public string CommandName { get; }
    // or a true/false delegate to decide if handler should handle a command
    // or a set of attributes that should match for the handler to get the command
    public void HandleCommand(sml.Identifier command);
}

public class ExpireCommandHandler
{
    public string CommandType { get { return "strategy" } }
    public string CommandName { get { return "expire-task" } }
    public void HandleCommand(sml.Identifier command)
    {
        // blah blah blah
    }
}
'''