NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
igroup.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // Copyright 1986, 2014 NVIDIA Corporation. All rights reserved.
3 //*****************************************************************************
6 //*****************************************************************************
7 
8 #ifndef MI_NEURAYLIB_IGROUP_H
9 #define MI_NEURAYLIB_IGROUP_H
10 
12 #include <mi/neuraylib/version.h>
13 
14 namespace mi {
15 
26 class IGroup :
37  public base::Interface_declare<0x3b26d1b4,0x4aa8,0x4876,0xad,0x7c,0x4a,0xaa,0xd9,0x25,0x0d,0xce,
38  IScene_element>
39 {
40 public:
42  virtual Uint32 get_length() const = 0;
43 
48  virtual const char* get_element( Uint32 index) const = 0;
49 
61  virtual Sint32 attach( const char* scene_element) = 0;
62 
74  virtual Sint32 detach( const char* scene_element) = 0;
75 
77  virtual void clear () = 0;
78 
79  virtual const base::IInterface* MI_NEURAYLIB_DEPRECATED_METHOD_5_0(access_element)(
80  Uint32 index) const = 0;
81 
82 #ifdef MI_NEURAYLIB_DEPRECATED_5_0
83  template<class T>
84  const T* access_element( Uint32 index) const
85  {
86  const base::IInterface* ptr_iinterface = access_element( index);
87  if( !ptr_iinterface)
88  return 0;
89  const T* ptr_T = static_cast<const T*>( ptr_iinterface->get_interface( typename T::IID()));
90  ptr_iinterface->release();
91  return ptr_T;
92  }
93 #endif
94 
95  virtual base::IInterface* MI_NEURAYLIB_DEPRECATED_METHOD_5_0(edit_element)(
96  Uint32 index) const = 0;
97 
98 #ifdef MI_NEURAYLIB_DEPRECATED_5_0
99  template<class T>
100  T* edit_element( Uint32 index) const
101  {
102  base::IInterface* ptr_iinterface = edit_element( index);
103  if( !ptr_iinterface)
104  return 0;
105  T* ptr_T = static_cast<T*>( ptr_iinterface->get_interface( typename T::IID()));
106  ptr_iinterface->release();
107  return ptr_T;
108  }
109 #endif
110 };
111  // end group mi_neuray_scene_graph_structure
113 
114 } // namespace mi
115 
116 #endif // MI_NEURAYLIB_IGROUP_H