CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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 *)