PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Documentation/CodingRules/ExampleClass.h

https://github.com/aivanov-cern/cmssw
C Header | 53 lines | 20 code | 14 blank | 19 comment | 0 complexity | 3c7dbe9ebb2db994063a3b3381427c62 MD5 | raw file
 1#ifndef ExampleClass_H
 2#define ExampleClass_H
 3
 4/** \class ExampleClass
 5 *  An example of doxygen-documented class conforming to the CMS style rules.
 6 *
 7 *  Features:<br>
 8 *  -doxygen-style header (note the \class directive)<br>
 9 *  -doxygen-like member function documentation<br>
10 *  -Few setters and getters
11 *
12 *  $Date: $
13 *  $Revision: $
14 *  \author W. Woodpecker - CERN
15 */
16
17#include <vector>
18
19class SomeAlgorithm;
20
21
22class ExampleClass {
23 public:
24  /// Constructor
25  ExampleClass();
26
27  /// Virtual Destructor
28  virtual ~ExampleClass();
29
30  /// A simple setter
31  void setCount(int ticks);
32
33  /// A simple getter
34  int count() const;
35
36  /// Another setter 
37  void setValues(const std::vector<float>& entries);
38
39  /// A getter returning a const reference
40  const std::vector<float>& values() const;
41
42  /// A member function
43  float computeMean() const;
44
45 protected:  
46
47 private:
48  int   theCount;          //< An int data member 
49  std::vector<float> theValues; //< A vector data member
50  SomeAlgorithm * theAlgo; //< A pointer data member
51
52};
53#endif // ExampleClass_H