CMS 3D CMS Logo

FWProxyBuilderTemplate.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWProxyBuilderTemplate_h
2 #define Fireworks_Core_FWProxyBuilderTemplate_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWProxyBuilderTemplate
7 //
16 //
17 // Original Author: Matevz Tadel
18 // Created: April 23 2010
19 //
20 
21 // system include files
22 #include <typeinfo>
23 
24 // user include files
28 
29 template <typename T>
31 public:
34 
35  // ---------- const member functions ---------------------
36 
37  // ---------- static member functions --------------------
38 
39  // ---------- member functions ---------------------------
40 
41 protected:
42  const T& modelData(int index) { return *reinterpret_cast<const T*>(m_helper.offsetObject(item()->modelData(index))); }
43 
44 public:
45  FWProxyBuilderTemplate(const FWProxyBuilderTemplate&) = delete; // stop default
46 
47  const FWProxyBuilderTemplate& operator=(const FWProxyBuilderTemplate&) = delete; // stop default
48 
49 private:
50  virtual void itemChangedImp(const FWEventItem* iItem) {
51  if (iItem)
52  m_helper.itemChanged(iItem);
53  }
54 
55  // ---------- member data --------------------------------
57 };
58 
59 #endif
FWSimpleProxyHelper m_helper
const T & modelData(int index)
virtual void itemChangedImp(const FWEventItem *iItem)
const FWProxyBuilderTemplate & operator=(const FWProxyBuilderTemplate &)=delete
const void * offsetObject(const void *iObj) const
long double T
const FWEventItem * item() const
void itemChanged(const FWEventItem *)