00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Alexander 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: ROP_RenderList.h ( ROP Library, C++) 00015 * 00016 * COMMENTS: 00017 * Defines a list of render objects, and ensures that no ROP/frame pair 00018 * is rendered twice within the list. 00019 */ 00020 #ifndef ROP_RenderList_h 00021 #define ROP_RenderList_h 00022 00023 #include "ROP_API.h" 00024 00025 #include <UT/UT_PtrArray.h> 00026 00027 class ROP_RenderItem; 00028 00029 class ROP_API ROP_RenderList 00030 { 00031 public: 00032 ROP_RenderList() {} 00033 ~ROP_RenderList(); 00034 00035 // this steals the pointer, and will delete it when this list is 00036 // destroyed. This may also immediately delete "item" if it is a 00037 // duplicate of an item already in the list (if so, it will set it to 00038 // NULL). Otherwise, it's added to the list. 00039 void addItem(ROP_RenderItem *&item); 00040 00041 int entries() const { return myItems.entries(); } 00042 00043 ROP_RenderItem *operator()(unsigned int i) { return myItems(i); } 00044 00045 const ROP_RenderItem *operator()(unsigned int i) const 00046 { return myItems(i); } 00047 00048 private: 00049 UT_PtrArray<ROP_RenderItem *> myItems; 00050 }; 00051 00052 #endif
1.5.9