CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWItemTVirtualCollectionProxyAccessor.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWItemTVirtualCollectionProxyAccessor_h
2 #define Fireworks_Core_FWItemTVirtualCollectionProxyAccessor_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWItemTVirtualCollectionProxyAccessor
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Sat Oct 18 08:43:45 EDT 2008
19 // $Id: FWItemTVirtualCollectionProxyAccessor.h,v 1.6 2012/06/26 22:13:04 wmtan Exp $
20 //
21 
22 // system include files
23 #include "boost/shared_ptr.hpp"
24 
25 // user include files
27 
28 // forward declarations
29 class TVirtualCollectionProxy;
30 
32 
33 public:
34  FWItemTVirtualCollectionProxyAccessor(const TClass* iType,
35  boost::shared_ptr<TVirtualCollectionProxy> iProxy,
36  size_t iOffset=0);
38 
39  // ---------- const member functions ---------------------
40  virtual const void* modelData(int iIndex) const ;
41  virtual const void* data() const;
42  virtual unsigned int size() const;
43  const TClass* modelType() const;
44  const TClass* type() const;
45 
46  bool isCollection() const;
47 
48  // ---------- static member functions --------------------
49 
50  // ---------- member functions ---------------------------
51  void setData(const Reflex::Object& );
52  void reset();
53 
54 private:
56 
58 
59  // ---------- member data --------------------------------
60  const TClass* m_type;
61  boost::shared_ptr<TVirtualCollectionProxy> m_colProxy; //should be something other than shared_ptr
62  mutable const void * m_data;
63  size_t m_offset;
64 };
65 
66 
67 #endif
FWItemTVirtualCollectionProxyAccessor(const TClass *iType, boost::shared_ptr< TVirtualCollectionProxy > iProxy, size_t iOffset=0)
boost::shared_ptr< TVirtualCollectionProxy > m_colProxy
void setData(const Reflex::Object &)
override if id of an object should be different than the index
const FWItemTVirtualCollectionProxyAccessor & operator=(const FWItemTVirtualCollectionProxyAccessor &)