LRAUV  revA
DecimationLogWriter.h
Go to the documentation of this file.
1 
10 #ifndef DECIMATIONLOGWRITER_H_
11 #define DECIMATIONLOGWRITER_H_
12 
13 #include "LogWriter.h"
14 #include <ctype.h>
15 
16 class DataValue;
17 
23 {
24 public:
25 
27  {
35  };
36 
37  static const char* DecimationType2Str( DecimationLogWriter::DecimationType decimationType );
38 
39  static DecimationType Str2DecimationType( const char* const typeStr, int len = -1 );
40 
41  static const char* const DECIMATION_TYPE_STRS[DECIMATION_COUNT];
42 
44 
46  DecimationLogWriter( LogWriter& outputTo, DecimationType decimationType )
47  : LogWriter(),
48  outputTo_( outputTo ),
49  decimationType_( decimationType )
50  {}
51 
54  {}
55 
57  {
58  return decimationType_;
59  }
60 
61  virtual void setParameter( DataValue* parameter, Logger& logger ) {}
62 
63  virtual unsigned int flush()
64  {
65  return 0;
66  }
67 
68 protected:
69 
72 
75 
76 private:
77  // Note that the copy constructor below is private and not given a body.
78  // Any attempt to call it will return a compiler error.
79  DecimationLogWriter( const DecimationLogWriter& old ); // disallow copy constructor
80 
81 };
82 
83 #endif /*DECIMATIONLOGWRITER_H_*/
Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
Base class for a generalized set of "log data destinations," including to files (text or binary)...
Definition: LogWriter.h:25
Contains the LogWriter class definition.
Definition: DecimationLogWriter.h:31
Definition: DecimationLogWriter.h:32
static const char *const DECIMATION_TYPE_STRS[DECIMATION_COUNT]
Definition: DecimationLogWriter.h:41
Definition: DecimationLogWriter.h:28
static const char * DecimationType2Str(DecimationLogWriter::DecimationType decimationType)
Definition: DecimationLogWriter.cpp:52
DecimationType decimationType_
Stores the decimationType.
Definition: DecimationLogWriter.h:74
Definition: DecimationLogWriter.h:29
Definition: DecimationLogWriter.h:33
A DataValue is an abstract base class for a data value and associated engineering units of the value...
Definition: DataValue.h:35
Base class for a generalized set of "log data destinations," including to files (text or binary)...
Definition: DecimationLogWriter.h:22
LogWriter & outputTo_
Stores an LogWriter.
Definition: DecimationLogWriter.h:71
Definition: DecimationLogWriter.h:34
virtual unsigned int flush()
Definition: DecimationLogWriter.h:63
DecimationType
Definition: DecimationLogWriter.h:26
DecimationLogWriter(LogWriter &outputTo, DecimationType decimationType)
Constructor.
Definition: DecimationLogWriter.h:46
static const size_t DECIMATION_TYPE_STRLEN[DECIMATION_COUNT]
Definition: DecimationLogWriter.h:43
virtual void setParameter(DataValue *parameter, Logger &logger)
Definition: DecimationLogWriter.h:61
DecimationType getDecimationType() const
Definition: DecimationLogWriter.h:56
Definition: DecimationLogWriter.h:30
static DecimationType Str2DecimationType(const char *const typeStr, int len=-1)
Definition: DecimationLogWriter.cpp:31
virtual ~DecimationLogWriter()
Destructor.
Definition: DecimationLogWriter.h:53