CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: FWConfigurableParameterizable.cc,v 1.5 2012/09/21 09:26:26 eulisse Exp $
12 //
13 
14 // system include files
15 
16 // user include files
20 #include <cassert>
21 
22 //
23 // constants, enums and typedefs
24 //
25 
26 //
27 // static data member definitions
28 //
29 
30 //
31 // constructors and destructor
32 //
34  m_version(iVersion)
35 {
36 }
37 
38 // FWConfigurableParameterizable::FWConfigurableParameterizable(const FWConfigurableParameterizable& rhs)
39 // {
40 // // do actual copying here;
41 // }
42 
44 {
45 }
46 
47 //
48 // assignment operators
49 //
50 // const FWConfigurableParameterizable& FWConfigurableParameterizable::operator=(const FWConfigurableParameterizable& rhs)
51 // {
52 // //An exception safe implementation is
53 // FWConfigurableParameterizable temp(rhs);
54 // swap(rhs);
55 //
56 // return *this;
57 // }
58 
59 //
60 // member functions
61 //
62 void
64 {
65  //need a way to handle versioning
66  assert(iFrom.version() == m_version);
67  for(const_iterator it =begin(), itEnd = end();
68  it != itEnd;
69  ++it) {
70  (*it)->setFrom(iFrom);
71  }
72 }
73 
74 //
75 // const member functions
76 //
77 void
79 {
80  for(const_iterator it =begin(), itEnd = end();
81  it != itEnd;
82  ++it) {
83  (*it)->addTo(oTo);
84  }
85 }
86 
87 //
88 // static member functions
89 //
std::vector< FWParameterBase * >::const_iterator const_iterator
const_iterator begin() const
FWConfigurableParameterizable(unsigned int iVersion=1)
virtual void setFrom(const FWConfiguration &)
unsigned int version() const
const_iterator end() const
virtual void addTo(FWConfiguration &) const