1//$ TEMPLATE SFNodeAndEngine(_TYPENAME_, _Typename_) 2 3/**************************************************************************\ 4 * Copyright (c) Kongsberg Oil & Gas Technologies AS 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are 9 * met: 10 * 11 * Redistributions of source code must retain the above copyright notice, 12 * this list of conditions and the following disclaimer. 13 * 14 * Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 18 * Neither the name of the copyright holder nor the names of its 19 * contributors may be used to endorse or promote products derived from 20 * this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33\**************************************************************************/ 34 35#ifndef COIN_SOSF_TYPENAME__H 36#define COIN_SOSF_TYPENAME__H 37 38#include <Inventor/fields/SoSField.h> 39#include <Inventor/fields/SoSubField.h> 40 41class So_Typename_; 42 43 44class COIN_DLL_API SoSF_Typename_ : public SoSField { 45 typedef SoSField inherited; 46 47 SO_SFIELD_HEADER(SoSF_Typename_, So_Typename_ *, So_Typename_ *); 48 49public: 50 static void initClass(void); 51 52 virtual void fixCopy(SbBool copyconnections); 53 virtual SbBool referencesCopy(void) const; 54 55private: 56 virtual void countWriteRefs(SoOutput * out) const; 57 58 // For accessing the readValue() and writeValue() methods. 59 friend class SoMF_Typename_; 60}; 61 62#endif // !COIN_SOSF_TYPENAME__H 63