]> git.mxchange.org Git - simgear.git/blob - simgear/props/vectorPropTemplates.hxx
Fixed a crash: the singleton needs to be instantiated the first time SGCommandMgr...
[simgear.git] / simgear / props / vectorPropTemplates.hxx
1 // vectorPropTemplates.hxx -- Templates Requiring Vector Properties
2 //
3 // Separate header file for any templates requiring SGVecXX vector types.
4
5 #ifndef __VECTORPROPTEMPLATES_HXX
6 #define __VECTORPROPTEMPLATES_HXX
7
8 #include "props.hxx"
9
10 // The templates below depend on the full SGMath.hxx include. Forward
11 // declarations (SGMathFwd.hxx) would be insufficient here (at least with MSVC).
12 #include <simgear/math/SGMath.hxx>
13
14 namespace simgear
15 {
16
17 // Extended properties
18 template<>
19 std::istream& readFrom<SGVec3d>(std::istream& stream, SGVec3d& result);
20 template<>
21 std::istream& readFrom<SGVec4d>(std::istream& stream, SGVec4d& result);
22
23 namespace props
24 {
25
26 template<>
27 struct PropertyTraits<SGVec3d>
28 {
29     static const Type type_tag = VEC3D;
30     enum  { Internal = 0 };
31 };
32
33 template<>
34 struct PropertyTraits<SGVec4d>
35 {
36     static const Type type_tag = VEC4D;
37     enum  { Internal = 0 };
38 };
39 }
40 }
41
42 template<>
43 std::ostream& SGRawBase<SGVec3d>::printOn(std::ostream& stream) const;
44 template<>
45 std::ostream& SGRawBase<SGVec4d>::printOn(std::ostream& stream) const;
46
47 #endif // __VECTORPROPTEMPLATES_HXX
48
49 // end of vectorPropTemplates.hxx