1 //------------------------------------------------------------------------------
2 // MessageDoubleItemTest.h
4 //------------------------------------------------------------------------------
6 #ifndef MESSAGEDOUBLEITEMTEST_H
7 #define MESSAGEDOUBLEITEMTEST_H
9 // Standard Includes -----------------------------------------------------------
11 // System Includes -------------------------------------------------------------
13 // Project Includes ------------------------------------------------------------
15 // Local Includes --------------------------------------------------------------
16 #include "MessageItemTest.h"
18 // Local Defines ---------------------------------------------------------------
20 // Globals ---------------------------------------------------------------------
22 typedef TMessageItemFuncPolicy
26 &BMessage::FindDouble
,
27 &BMessage::FindDouble
,
28 &BMessage::FindDouble
,
30 &BMessage::ReplaceDouble
34 struct TDoubleInitPolicy
: public ArrayTypeBase
<double>
36 inline static double Zero() { return 0; }
37 inline static double Test1() { return 1.234; }
38 inline static double Test2() { return 5.678; }
39 inline static size_t SizeOf(const double&) { return sizeof (double); }
40 inline static ArrayType
Array()
43 array
.push_back(1.23);
44 array
.push_back(4.56);
45 array
.push_back(7.89);
50 struct TDoubleAssertPolicy
52 inline static double Zero() { return 0; }
53 inline static double Invalid() { return 0; }
54 inline static bool Size(size_t size
, double& d
)
55 { return size
== sizeof (d
); }
58 typedef TMessageItemTest
66 TMessageDoubleItemTest
;
68 #endif // MESSAGEDOUBLEITEMTEST_H