Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
radar.cpp
Go to the documentation of this file.
1
// -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
2
3
#include <cassert>
4
#include <stdexcept>
5
#include "
sensor.h
"
6
#include "
radar.h
"
7
#include "
null_display.h
"
8
#include "
sphere_display.h
"
9
#include "
bubble_display.h
"
10
#include "
plane_display.h
"
11
12
namespace
Radar
13
{
14
15
std::auto_ptr<Display>
Factory
(
Type::Value
type)
16
{
17
switch
(type)
18
{
19
case
Type::NullDisplay
:
20
return
std::auto_ptr<Display>(
new
NullDisplay
);
21
22
case
Type::SphereDisplay
:
23
return
std::auto_ptr<Display>(
new
SphereDisplay
);
24
25
case
Type::BubbleDisplay
:
26
return
std::auto_ptr<Display>(
new
BubbleDisplay
);
27
28
case
Type::PlaneDisplay
:
29
return
std::auto_ptr<Display>(
new
PlaneDisplay
);
30
31
default
:
32
assert(
false
);
33
throw
std::invalid_argument(
"Unknown radar type"
);
34
}
35
}
36
37
}
// namespace Radar
src
gfx
radar
radar.cpp
Generated on Fri May 29 2015 23:07:28 for Vegastrike 0.5.1 rc1 by
1.8.4