VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
examples
bhaveRemoteControl
textIf.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2012 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
6
#ifndef DtTextInterface_H_
7
#define DtTextInterface_H_
8
9
#include "vlutil/vlUtil.h"
10
#include "vl/globalObjDes.h"
11
12
//This class provides a text interface for testing the BHAVE messages API
13
//via a VRForces remote controller.
15
//This interface currently supports the following actions:
16
//
17
//1. Create a M1A2 tank at a predefined location
19
//2. Task the tank to wander (BHAVE wander task)
21
//3. quit the application
22
23
class
DtVrfRemoteController
;
24
class
DtSimMessage
;
25
26
class
DtTextInterface
27
{
28
29
public
:
30
31
//constructor
32
DtTextInterface
(
DtVrfRemoteController
*
controller
);
33
34
//destructor
35
virtual
~DtTextInterface
();
36
37
//Process entered text
38
void
readStdin
();
39
void
createScenario
(
char
* str);
40
41
//Set/Get time to quit
42
virtual
void
setTimeToQuit
(
bool
yesNo);
43
virtual
bool
timeToQuit
()
const
;
44
45
//To test whether the scenario has been loaded
46
virtual
bool
scenarioLoaded
()
const
;
47
48
//Show the menu
49
void
prompt
();
50
51
//Get remote vrf controller pointer
52
virtual
DtVrfRemoteController
*
controller
()
const
;
53
54
public
:
55
56
//Functions for calling the corresponding methods on DtVrfRemoteController.
57
58
virtual
void
createTank
(
char
* str);
59
60
virtual
void
createWanderTask
();
61
62
//-------------------------------------------------------
63
//DtVrfRemoteController callback functions
64
//-------------------------------------------------------
65
66
//Scenario loaded/saved callbacks
67
static
void
scenarioLoadedCb
(
void
* usr);
68
69
//VR-Forces object created callback
70
static
void
vrfObjectCreatedCb
(
71
const
DtString
& name,
const
DtEntityIdentifier&
id
,
void
* usr);
72
73
protected
:
74
75
bool
myTimeToQuit
;
76
DtVrfRemoteController
*
myController
;
77
static
bool
myScenarioLoaded
;
78
static
bool
myTankCreated
;
79
static
DtString
myMsg
;
80
81
};
82
83
84
#endif
85
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)