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-2018 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(const SoType& type, int stackIndex, SoState* state, SbIntList& value); 00067 00068 static void set(const SoType& type, int stackIndex, SoState* state, SoNode*, SbIntList value) 00069 { set(type, stackIndex, state, value); } 00070 00071 // Virtual set that subclasses can override to implement 00072 // side-effect behaviors. 00073 virtual void setElt(SbIntList& value); 00074 00075 // Get value. Derived classes have static inline methods to pass 00076 // in the stackIndex and cast the returned value to the right type. 00077 //static SbIntList get(int stackIndex, SoState *state) 00078 //{ return getConstElement(state, stackIndex)->data; } 00079 00080 static const SbIntList& get(const SoType& type, int stackIndex, SoState* state) 00081 { return (static_cast<const SoInt32ListElement*>(getConstElement(state, type, stackIndex)))->data; } 00082 00083 private: 00084 // Storage for data. 00085 SbIntList data; 00086 00087 virtual ~SoInt32ListElement(); 00088 }; 00089 00090 #endif // _SO_INT32_LIST_ELEMENT 00091 00092 00093