Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SoAuditorList.h

00001 /**************************************************************************\
00002  *
00003  *  This file is part of the Coin 3D visualization library.
00004  *  Copyright (C) 1998-2002 by Systems in Motion. All rights reserved.
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Lesser General Public License
00008  *  version 2.1 as published by the Free Software Foundation. See the
00009  *  file LICENSE.LGPL at the root directory of the distribution for
00010  *  more details.
00011  *
00012  *  If you want to use Coin for applications not compatible with the
00013  *  LGPL, please contact SIM to acquire a Professional Edition license.
00014  *
00015  *  Systems in Motion, Prof Brochs gate 6, 7030 Trondheim, NORWAY
00016  *  http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097
00017  *
00018 \**************************************************************************/
00019 
00020 #ifndef COIN_SOAUDITORLIST_H
00021 #define COIN_SOAUDITORLIST_H
00022 
00023 #include <Inventor/lists/SbPList.h>
00024 #include <Inventor/misc/SoNotification.h>
00025 
00026 
00027 // Important note: do not expand this class with any further data
00028 // unless absolutely necessary, as every SoBase object contains (by
00029 // value) an SoAuditorList.
00030 //
00031 // So if you increase the size of objects of this class by just a
00032 // minor amount, it could have adverse effects on the total memory
00033 // usage in a Coin application, as SoBase-derived objects are
00034 // ubiquitous within the system.
00035 //
00036 //  -mortene
00037 
00038 
00039 class COIN_DLL_API SoAuditorList : private SbPList {
00040   typedef SbPList inherited;
00041 
00042 public:
00043   SoAuditorList(void);
00044   ~SoAuditorList();
00045 
00046   void append(void * const auditor, const SoNotRec::Type type);
00047 
00048   void set(const int index, void * const auditor, const SoNotRec::Type type);
00049   void * getObject(const int index) const;
00050   SoNotRec::Type getType(const int index) const;
00051 
00052   int getLength(void) const;
00053   int find(void * const auditor, const SoNotRec::Type type) const;
00054 
00055   void remove(const int index);
00056   void remove(void * const auditor, const SoNotRec::Type type);
00057 
00058   void notify(SoNotList * l);
00059 
00060 private:
00061   // Hide these, as they are "dangerous" for this class, in the sense
00062   // that they need to be rewritten to behave correctly.
00063   SoAuditorList(const int) { }
00064   SoAuditorList(const SoAuditorList & l) : SbPList(l) { }
00065   void * get(const int) const { return NULL; }
00066   void set(const int, void * const) { }
00067   void copy(const SbPList &) { }
00068   void append(const void *) { }
00069   int find(const void *) const { return -1; }
00070   void insert(const void *, const int) { }
00071   void removeFast(const int) { }
00072   void truncate(const int, const int = 0) { }
00073   void push(const void *) { }
00074   void * pop(void) { return NULL; }
00075   SbPList & operator=(const SbPList &) { return *this; }
00076   operator void ** (void) { return (void **) NULL; }
00077   operator const void ** (void) const { return (const void **) NULL; }
00078   void * operator[](const int) const { return NULL; }
00079   void * & operator[](const int) { return SbPList::operator[](0); }
00080   int operator==(const SbPList &) const { return 0; }
00081   int operator!=(const SbPList &) const { return 0; }
00082 };
00083 
00084 #endif // !COIN_SOAUDITORLIST_H

Generated at Tue Mar 5 03:31:11 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001