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 private:
45  FWProxyBuilderTemplate(const FWProxyBuilderTemplate&) = delete; // stop default
46 
47  const FWProxyBuilderTemplate& operator=(const FWProxyBuilderTemplate&) = delete; // stop default
48 
49  virtual void itemChangedImp(const FWEventItem* iItem) {
50  if (iItem)
51  m_helper.itemChanged(iItem);
52  }
53 
54  // ---------- member data --------------------------------
56 };
57 
58 #endif
const void * offsetObject(const void *iObj) const
FWSimpleProxyHelper m_helper
const FWEventItem * item() const
const T & modelData(int index)
virtual void itemChangedImp(const FWEventItem *iItem)
const FWProxyBuilderTemplate & operator=(const FWProxyBuilderTemplate &)=delete
long double T
void itemChanged(const FWEventItem *)