00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author(s) : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_INT32_LIST_ELEMENT 00026 #define _SO_INT32_LIST_ELEMENT 00027 00040 #include <Inventor/elements/SoSubElement.h> 00041 00042 SoEXTENDER_Documented class SoInt32ListElement : public SoElement 00043 { 00044 SO_ELEMENT_ABSTRACT_HEADER(SoInt32ListElement); 00045 00046 private: 00047 00051 virtual SbBool matches(const SoElement* elt) const; 00052 00054 virtual SoElement* copyMatchInfo() const; 00055 00056 private: 00057 // Initializes the SoInt32ListElement class 00058 static void initClass(); 00059 static void exitClass(); 00060 00061 // Set value. Derived classes have static inline methods 00062 // that pass in the stack index and cast their type into a int32_t. 00063 // This just gets an appropriate instance and calls the virtual 00064 // set. 00065 //static void set(int stackIndex, SoState *state, int32_t value); 00066 static void set(SoType type, int stackIndex, SoState* state, SbIntList& value); 00067 00068 #ifndef IV_STRICT 00069 static void set(SoType type, int stackIndex, SoState* state, SoNode*, SbIntList value) 00070 { set(type, stackIndex, state, value); } 00071 #endif 00072 00073 // Virtual set that subclasses can override to implement 00074 // side-effect behaviors. 00075 virtual void setElt(SbIntList& value); 00076 00077 // Get value. Derived classes have static inline methods to pass 00078 // in the stackIndex and cast the returned value to the right type. 00079 //static SbIntList get(int stackIndex, SoState *state) 00080 //{ return getConstElement(state, stackIndex)->data; } 00081 00082 static SbIntList& get(SoType type, int stackIndex, SoState* state) 00083 { return ((SoInt32ListElement*)getConstElement(state, type, stackIndex))->data; } 00084 00085 private: 00086 // Storage for data. 00087 SbIntList data; 00088 00089 virtual ~SoInt32ListElement(); 00090 }; 00091 00092 #endif // _SO_INT32_LIST_ELEMENT 00093 00094 00095