File: ConsoleObject.h

package info (click to toggle)
sear 0.5.0-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,408 kB
  • ctags: 2,580
  • sloc: cpp: 14,902; sh: 10,890; makefile: 172
file content (39 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// This file may be redistributed and modified only under the terms of
// the GNU General Public License (See COPYING for details).
// Copyright (C) 2001 - 2002 Simon Goodall

// $Id: ConsoleObject.h,v 1.1 2003/03/23 19:51:49 simon Exp $

#ifndef SEAR_CONSOLEOBJECT_H
#define SEAR_CONSOLEOBJECT_H 1

#include <string>

namespace Sear {
/**
 * The ConsoleObject is a interface used to allow objects to register commands
 * with the console. Any object wishing to register a command, must implement 
 *  this interface.
 */ 
class ConsoleObject {
public:
  /**
   * Default constructor
   */ 	
  ConsoleObject() {}

  /**
   * Default destructor
   */ 
  virtual ~ConsoleObject() {}

  /**
   * This is the function that needs to be extended to use the console.
   * command is a command that has been previously registered with the console
   * args is the argument string that has been provided for the command
   */ 
  virtual void runCommand(const std::string &command, const std::string &args) = 0;
};

} /* namespace Sear */
#endif /* SEAR_CONSOLEOBJECT_H */