Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Radar Namespace Reference

Classes

class  BubbleDisplay
 
class  DualDisplayBase
 
class  NullDisplay
 
class  PlaneDisplay
 
class  Display
 
struct  Type
 
class  CollectRadarTracks
 
class  Sensor
 
class  SphereDisplay
 
class  Track
 
struct  ViewArea
 

Functions

std::auto_ptr< DisplayFactory (Type::Value type)
 

Function Documentation

std::auto_ptr< Display > Radar::Factory ( Type::Value  type)

Definition at line 15 of file radar.cpp.

References Radar::Type::BubbleDisplay, Radar::Type::NullDisplay, Radar::Type::PlaneDisplay, and Radar::Type::SphereDisplay.

Referenced by GameCockpit::GameCockpit().

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 }