KSquare Utilities
ScannerHeaderFields.h
Go to the documentation of this file.
1 #if !defined(_SCANNERHEADERFIELDS_)
2 #define _SCANNERHEADERFIELDS_
3 #include <map>
4 #include "DateTime.h"
5 #include "GoalKeeper.h"
6 #include "KKStr.h"
7 #include "KKQueue.h"
8 
9 namespace KKLSC
10 {
11  /**
12  *@brief Represents a list of header fields from a Scanner File.
13  *@details All ScannerFiles will start with a Header section that consists of text
14  * with each line consisting of a "FieldName" allowed by a "FieldValue" separated by the
15  * tab character.
16  */
18  {
19  public:
21 
23 
25 
27 
29 
30  void Add (ScannerHeaderFieldsPtr fields);
31 
32  void Add (const KKB::KKStr& fieldName,
33  const KKB::KKStr& fieldValue
34  );
35 
36  void Add (const KKB::KKStr& fieldName,
37  bool fieldValue
38  );
39 
40  void Add (const KKStr& fieldName,
41  kkint32 fieldValue
42  );
43 
44  void Add (const KKStr& fieldName,
45  kkint64 fieldValue
46  );
47 
48  void Add (const KKStr& fieldName,
49  double fieldValue
50  );
51 
52  void Add (const KKStr& fieldName,
53  KKB::DateTime fieldValue
54  );
55 
56  void Clear (); /**< Erases contents */
57 
58  bool FieldExists (const KKStr& fieldName) const;
59 
60  const KKStr& GetValue (const KKStr& fieldName) const;
61 
62  float GetValueFloat (const KKStr& fieldName) const;
63 
64  kkint32 GetValueInt32 (const KKStr& fieldName) const;
65 
66  void StartBlock ();
67  void EndBlock ();
68 
70 
71  private:
72  GoalKeeperPtr goalie;
73  iterator idx1;
74  mutable const_iterator idx2;
75  };
76 
78 
79 } /* KKLSC */
80 
81 #endif
__int32 kkint32
Definition: KKBaseTypes.h:88
kkint32 GetValueInt32(const KKStr &fieldName) const
ScannerHeaderFields * ScannerHeaderFieldsPtr
void Add(const KKStr &fieldName, kkint32 fieldValue)
bool FieldExists(const KKStr &fieldName) const
__int64 kkint64
Definition: KKBaseTypes.h:90
KKTHread * KKTHreadPtr
void Add(const KKStr &fieldName, double fieldValue)
float GetValueFloat(const KKStr &fieldName) const
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of &#39;std::string&#39; strings.
Definition: KKStr.cpp:1082
Contains Classes that are specific to Cameras physical characteristics.
ScannerHeaderFields * ScannerHeaderFieldsPtr
Represents a list of header fields from a Scanner File.
map< KKStr, KKStr >::iterator iterator
void Add(const KKStr &fieldName, KKB::DateTime fieldValue)
const KKStr & GetValue(const KKStr &fieldName) const
void Add(const KKB::KKStr &fieldName, bool fieldValue)
ScannerHeaderFields(const ScannerHeaderFields &fields)
void Add(const KKStr &fieldName, kkint64 fieldValue)
void Add(ScannerHeaderFieldsPtr fields)
void Add(const KKB::KKStr &fieldName, const KKB::KKStr &fieldValue)