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.3 2009/01/23 21:35:42 amraktad Exp $
12 //
13 
14 // system include files
15 
16 // user include files
20 
21 //
22 // constants, enums and typedefs
23 //
24 
25 //
26 // static data member definitions
27 //
28 
29 //
30 // constructors and destructor
31 //
33  m_version(iVersion)
34 {
35 }
36 
37 // FWConfigurableParameterizable::FWConfigurableParameterizable(const FWConfigurableParameterizable& rhs)
38 // {
39 // // do actual copying here;
40 // }
41 
43 {
44 }
45 
46 //
47 // assignment operators
48 //
49 // const FWConfigurableParameterizable& FWConfigurableParameterizable::operator=(const FWConfigurableParameterizable& rhs)
50 // {
51 // //An exception safe implementation is
52 // FWConfigurableParameterizable temp(rhs);
53 // swap(rhs);
54 //
55 // return *this;
56 // }
57 
58 //
59 // member functions
60 //
61 void
63 {
64  //need a way to handle versioning
65  assert(iFrom.version() == m_version);
66  for(const_iterator it =begin(), itEnd = end();
67  it != itEnd;
68  ++it) {
69  (*it)->setFrom(iFrom);
70  }
71 }
72 
73 //
74 // const member functions
75 //
76 void
78 {
79  for(const_iterator it =begin(), itEnd = end();
80  it != itEnd;
81  ++it) {
82  (*it)->addTo(oTo);
83  }
84 }
85 
86 //
87 // static member functions
88 //
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