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 //
FWParameterizable::const_iterator
std::vector< FWParameterBase * >::const_iterator const_iterator
Definition: FWParameterizable.h:34
cms::cuda::assert
assert(be >=bs)
FWParameterizable::end
const_iterator end() const
Definition: FWParameterizable.h:38
FWConfigurableParameterizable.h
FWParameterizable::begin
const_iterator begin() const
Definition: FWParameterizable.h:36
FWConfigurableParameterizable::~FWConfigurableParameterizable
~FWConfigurableParameterizable() override
Definition: FWConfigurableParameterizable.cc:39
FWConfigurableParameterizable::setFrom
void setFrom(const FWConfiguration &) override
Definition: FWConfigurableParameterizable.cc:56
FWParameterBase.h
FWConfiguration::version
unsigned int version() const
Definition: FWConfiguration.h:49
FWConfigurableParameterizable::addTo
void addTo(FWConfiguration &) const override
Definition: FWConfigurableParameterizable.cc:67
FWConfiguration
Definition: FWConfiguration.h:31
FWConfigurableParameterizable::m_version
unsigned int m_version
Definition: FWConfigurableParameterizable.h:49
FWConfiguration.h
FWConfigurableParameterizable::FWConfigurableParameterizable
FWConfigurableParameterizable(unsigned int iVersion=1)
Definition: FWConfigurableParameterizable.cc:32