#region File Description
//-----------------------------------------------------------------------------
// IDebugCommandHost.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion
#region Using Statements
using System.Collections.Generic;
#endregion
namespace HoneycombRush.GameDebugTools
{
///
/// Message types for debug command.
///
public enum DebugCommandMessage
{
Standard = 1,
Error = 2,
Warning = 3
}
///
/// Debug command execution delegate.
///
/// Host who will execute the command.
/// command name
/// command arguments
public delegate void DebugCommandExecute(IDebugCommandHost host, string command,
IList arguments);
///
/// Interface for debug command executioner.
///
public interface IDebugCommandExecutioner
{
///
/// Execute command
///
void ExecuteCommand(string command);
}
///
/// Interface for debug command message listener.
///
public interface IDebugEchoListner
{
///
/// Output message.
///
/// type of message
/// message text
void Echo(DebugCommandMessage messageType, string text);
}
///
/// Interface for debug command host.
///
public interface IDebugCommandHost : IDebugEchoListner, IDebugCommandExecutioner
{
///
/// Register new command.
///
/// command name
/// description of command
/// Execute delegation
void RegisterCommand(string command, string description,
DebugCommandExecute callback);
///
/// Unregister command.
///
/// command name
void UnregisterCommand(string command);
///
/// Output Standard message.
///
///
void Echo(string text);
///
/// Output Warning message.
///
///
void EchoWarning(string text);
///
/// Output Error message.
///
///
void EchoError(string text);
///
/// Register message listener.
///
///
void RegisterEchoListner(IDebugEchoListner listner);
///
/// Unregister message listener.
///
///
void UnregisterEchoListner(IDebugEchoListner listner);
///
/// Add Command executioner.
///
void PushExecutioner(IDebugCommandExecutioner executioner);
///
/// Remote Command executioner.
///
void PopExecutioner();
}
}