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_SONOTIFICATION_H 00021 #define COIN_SONOTIFICATION_H 00022 00023 #include <Inventor/SbBasic.h> 00024 #include <Inventor/system/inttypes.h> 00025 #include <stdio.h> 00026 00027 class SoBase; 00028 00029 00030 class COIN_DLL_API SoNotRec { 00031 public: 00032 enum Type { 00033 CONTAINER, 00034 PARENT, 00035 SENSOR, 00036 FIELD, 00037 ENGINE, 00038 INTERP 00039 }; 00040 00041 SoNotRec(SoBase * const notifbase); 00042 void setType(const SoNotRec::Type type); 00043 SoBase * getBase(void) const; 00044 SoNotRec::Type getType(void) const; 00045 const SoNotRec * getPrevious(void) const; 00046 void setPrevious(const SoNotRec * const prev); 00047 void print(FILE * const file) const; 00048 00049 private: 00050 Type type; 00051 SoBase * base; 00052 const SoNotRec * prev; 00053 }; 00054 00055 class SoEngineOutput; 00056 class SoField; 00057 class SoVRMLInterpOutput; 00058 00059 class COIN_DLL_API SoNotList { 00060 public: 00061 SoNotList(void); 00062 SoNotList(const SoNotList * nl); 00063 00064 void append(SoNotRec * const rec); 00065 void append(SoNotRec * const rec, SoField * const field); 00066 void append(SoNotRec * const rec, SoVRMLInterpOutput * const interpout); 00067 void append(SoNotRec * const rec, SoEngineOutput * const engineout); 00068 void setLastType(const SoNotRec::Type type); 00069 SoNotRec * getFirstRec(void) const; 00070 SoNotRec * getLastRec(void) const; 00071 SoNotRec * getFirstRecAtNode(void) const; 00072 SoField * getLastField(void) const; 00073 SoVRMLInterpOutput * getLastInterpOutput(void) const; 00074 SoEngineOutput * getLastEngineOutput(void) const; 00075 uint32_t getTimeStamp(void) const; 00076 00077 void print(FILE * const file = stdout) const; 00078 00079 private: 00080 SoNotRec * head; 00081 SoNotRec * tail; 00082 SoNotRec * firstnoderec; 00083 SoField * lastfield; 00084 SoEngineOutput * lastengine; 00085 SoVRMLInterpOutput * lastinterp; 00086 uint32_t stamp; 00087 }; 00088 00089 #endif // !COIN_SONOTIFICATION_H