Home | History | Annotate | Download | only in dom
      1 /*
      2 * Copyright 2006 Sony Computer Entertainment Inc.
      3 *
      4 * Licensed under the MIT Open Source License, for details please see license.txt or the website
      5 * http://www.opensource.org/licenses/mit-license.php
      6 *
      7 */
      8 
      9 #ifndef __domP_h__
     10 #define __domP_h__
     11 
     12 #include <dae/daeDocument.h>
     13 #include <dom/domTypes.h>
     14 #include <dom/domElements.h>
     15 
     16 class DAE;
     17 
     18 /**
     19  * The p element represents primitive data for the primitive types (lines,
     20  * linestrips, polygons,  polylist, triangles, trifans, tristrips). The p
     21  * element contains indices that reference into  the parent's source elements
     22  * referenced by the input elements.
     23  */
     24 class domP : public daeElement
     25 {
     26 public:
     27 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::P; }
     28 	static daeInt ID() { return 617; }
     29 	virtual daeInt typeID() const { return ID(); }
     30 
     31 protected:  // Value
     32 	/**
     33 	 * The domListOfUInts value of the text data of this element.
     34 	 */
     35 	domListOfUInts _value;
     36 
     37 public:	//Accessors and Mutators
     38 	/**
     39 	 * Gets the _value array.
     40 	 * @return Returns a domListOfUInts reference of the _value array.
     41 	 */
     42 	domListOfUInts &getValue() { return _value; }
     43 	/**
     44 	 * Gets the _value array.
     45 	 * @return Returns a constant domListOfUInts reference of the _value array.
     46 	 */
     47 	const domListOfUInts &getValue() const { return _value; }
     48 	/**
     49 	 * Sets the _value array.
     50 	 * @param val The new value for the _value array.
     51 	 */
     52 	void setValue( const domListOfUInts &val ) { _value = val; }
     53 
     54 protected:
     55 	/**
     56 	 * Constructor
     57 	 */
     58 	domP(DAE& dae) : daeElement(dae), _value() {}
     59 	/**
     60 	 * Destructor
     61 	 */
     62 	virtual ~domP() {}
     63 	/**
     64 	 * Overloaded assignment operator
     65 	 */
     66 	virtual domP &operator=( const domP &cpy ) { (void)cpy; return *this; }
     67 
     68 public: // STATIC METHODS
     69 	/**
     70 	 * Creates an instance of this class and returns a daeElementRef referencing it.
     71 	 * @return a daeElementRef referencing an instance of this object.
     72 	 */
     73 	static DLLSPEC daeElementRef create(DAE& dae);
     74 	/**
     75 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
     76 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
     77 	 * @return A daeMetaElement describing this COLLADA element.
     78 	 */
     79 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
     80 };
     81 
     82 
     83 #endif
     84