CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
27 
28 class FWEventItem;
29 
30 template <typename T>
32 {
33 public:
36 
37  // ---------- const member functions ---------------------
38 
39  // ---------- static member functions --------------------
40 
41  // ---------- member functions ---------------------------
42 
43 protected:
44  const T& modelData(int index) { return *reinterpret_cast<const T*>(m_helper.offsetObject(item()->modelData(index))); }
45 
46 private:
47  FWProxyBuilderTemplate(const FWProxyBuilderTemplate&); // stop default
48 
49  const FWProxyBuilderTemplate& operator=(const FWProxyBuilderTemplate&); // stop default
50 
51  virtual void itemChangedImp(const FWEventItem* iItem) { if (iItem) m_helper.itemChanged(iItem); }
52 
53  // ---------- member data --------------------------------
55 };
56 
57 #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 &)
long double T
void itemChanged(const FWEventItem *)