![]() |
http://www.sim.no http://www.coin3d.org |
00001 #ifndef COIN_SOAUDITORLIST_H 00002 #define COIN_SOAUDITORLIST_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Systems in Motion about acquiring 00018 * a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/lists/SbPList.h> 00028 #include <Inventor/misc/SoNotification.h> 00029 00030 00031 // Important note: do not expand this class with any further data 00032 // unless absolutely necessary, as every SoBase object contains (by 00033 // value) an SoAuditorList. 00034 // 00035 // So if you increase the size of objects of this class by just a 00036 // minor amount, it could have adverse effects on the total memory 00037 // usage in a Coin application, as SoBase-derived objects are 00038 // ubiquitous within the system. 00039 // 00040 // -mortene 00041 00042 00043 class COIN_DLL_API SoAuditorList : private SbPList { 00044 typedef SbPList inherited; 00045 00046 public: 00047 SoAuditorList(void); 00048 ~SoAuditorList(); 00049 00050 void append(void * const auditor, const SoNotRec::Type type); 00051 00052 void set(const int index, void * const auditor, const SoNotRec::Type type); 00053 void * getObject(const int index) const; 00054 SoNotRec::Type getType(const int index) const; 00055 00056 int getLength(void) const; 00057 int find(void * const auditor, const SoNotRec::Type type) const; 00058 00059 void remove(const int index); 00060 void remove(void * const auditor, const SoNotRec::Type type); 00061 00062 void notify(SoNotList * l); 00063 00064 private: 00065 // Hide these, as they are "dangerous" for this class, in the sense 00066 // that they need to be rewritten to behave correctly. 00067 SoAuditorList(const int) { } 00068 SoAuditorList(const SoAuditorList & l) : SbPList(l) { } 00069 void * get(const int) const { return NULL; } 00070 void set(const int, void * const) { } 00071 void copy(const SbPList &) { } 00072 void append(const void *) { } 00073 int find(const void *) const { return -1; } 00074 void insert(const void *, const int) { } 00075 void removeFast(const int) { } 00076 void truncate(const int, const int = 0) { } 00077 void push(const void *) { } 00078 void * pop(void) { return NULL; } 00079 SbPList & operator=(const SbPList &) { return *this; } 00080 operator void ** (void) { return (void **) NULL; } 00081 operator const void ** (void) const { return (const void **) NULL; } 00082 void * operator[](const int) const { return NULL; } 00083 void * & operator[](const int) { return SbPList::operator[](0); } 00084 int operator==(const SbPList &) const { return 0; } 00085 int operator!=(const SbPList &) const { return 0; } 00086 00087 void doNotify(SoNotList * l, const void * auditor, const SoNotRec::Type type); 00088 00089 }; 00090 00091 #endif // !COIN_SOAUDITORLIST_H
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Mon Feb 28 2011 10:11:53 for Coin by Doxygen. 1.7.3