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 // $Id: FWProxyBuilderTemplate.h,v 1.1 2010/04/23 21:01:59 amraktad Exp $
20 //
21 
22 // system include files
23 #include <typeinfo>
24 
25 // user include files
28 
29 class FWEventItem;
30 
31 template <typename T>
33 {
34 public:
37 
38  // ---------- const member functions ---------------------
39 
40  // ---------- static member functions --------------------
41 
42  // ---------- member functions ---------------------------
43 
44 protected:
45  const T& modelData(int index) { return *reinterpret_cast<const T*>(m_helper.offsetObject(item()->modelData(index))); }
46 
47 private:
48  FWProxyBuilderTemplate(const FWProxyBuilderTemplate&); // stop default
49 
50  const FWProxyBuilderTemplate& operator=(const FWProxyBuilderTemplate&); // stop default
51 
52  virtual void itemChangedImp(const FWEventItem* iItem) { if (iItem) m_helper.itemChanged(iItem); }
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 &)
long double T
void itemChanged(const FWEventItem *)