CMS 3D CMS Logo

FWConfigurableParameterizable.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWConfigurableParameterizable
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Sun Mar 16 12:01:36 EDT 2008
11 //
12 
13 // system include files
14 
15 // user include files
19 #include <cassert>
20 
21 //
22 // constants, enums and typedefs
23 //
24 
25 //
26 // static data member definitions
27 //
28 
29 //
30 // constructors and destructor
31 //
32 FWConfigurableParameterizable::FWConfigurableParameterizable(unsigned int iVersion) : m_version(iVersion) {}
33 
34 // FWConfigurableParameterizable::FWConfigurableParameterizable(const FWConfigurableParameterizable& rhs)
35 // {
36 // // do actual copying here;
37 // }
38 
40 
41 //
42 // assignment operators
43 //
44 // const FWConfigurableParameterizable& FWConfigurableParameterizable::operator=(const FWConfigurableParameterizable& rhs)
45 // {
46 // //An exception safe implementation is
47 // FWConfigurableParameterizable temp(rhs);
48 // swap(rhs);
49 //
50 // return *this;
51 // }
52 
53 //
54 // member functions
55 //
57  //need a way to handle versioning
58  assert(iFrom.version() == m_version);
59  for (const_iterator it = begin(), itEnd = end(); it != itEnd; ++it) {
60  (*it)->setFrom(iFrom);
61  }
62 }
63 
64 //
65 // const member functions
66 //
68  for (const_iterator it = begin(), itEnd = end(); it != itEnd; ++it) {
69  (*it)->addTo(oTo);
70  }
71 }
72 
73 //
74 // static member functions
75 //
const_iterator begin() const
FWConfigurableParameterizable(unsigned int iVersion=1)
void setFrom(const FWConfiguration &) override
std::vector< FWParameterBase * >::const_iterator const_iterator
assert(be >=bs)
const_iterator end() const
void addTo(FWConfiguration &) const override
unsigned int version() const