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 __domFx_code_profile_h__
     10 #define __domFx_code_profile_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 fx_code_profile type allows you to specify an inline block of source
     20  * code.
     21  */
     22 class domFx_code_profile_complexType
     23 {
     24 protected:  // Attribute
     25 /**
     26  *  The sid attribute is a text string value containing the sub-identifier
     27  * of this element.  This value must be unique within the scope of the parent
     28  * element. Optional attribute.
     29  */
     30 	xsNCName attrSid;
     31 
     32 protected:  // Value
     33 	/**
     34 	 * The xsString value of the text data of this element.
     35 	 */
     36 	xsString _value;
     37 
     38 public:	//Accessors and Mutators
     39 	/**
     40 	 * Gets the sid attribute.
     41 	 * @return Returns a xsNCName of the sid attribute.
     42 	 */
     43 	xsNCName getSid() const { return attrSid; }
     44 	/**
     45 	 * Sets the sid attribute.
     46 	 * @param atSid The new value for the sid attribute.
     47 	 */
     48 	void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid;}
     49 
     50 	/**
     51 	 * Gets the value of this element.
     52 	 * @return Returns a xsString of the value.
     53 	 */
     54 	xsString getValue() const { return _value; }
     55 	/**
     56 	 * Sets the _value of this element.
     57 	 * @param val The new value for this element.
     58 	 */
     59 	void setValue( xsString val ) { *(daeStringRef*)&_value = val; }
     60 
     61 protected:
     62 	/**
     63 	 * Constructor
     64 	 */
     65 	domFx_code_profile_complexType(DAE& dae, daeElement* elt) : attrSid(), _value() {}
     66 	/**
     67 	 * Destructor
     68 	 */
     69 	virtual ~domFx_code_profile_complexType() {}
     70 	/**
     71 	 * Overloaded assignment operator
     72 	 */
     73 	virtual domFx_code_profile_complexType &operator=( const domFx_code_profile_complexType &cpy ) { (void)cpy; return *this; }
     74 };
     75 
     76 /**
     77  * An element of type domFx_code_profile_complexType.
     78  */
     79 class domFx_code_profile : public daeElement, public domFx_code_profile_complexType
     80 {
     81 public:
     82 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_CODE_PROFILE; }
     83 	static daeInt ID() { return 96; }
     84 	virtual daeInt typeID() const { return ID(); }
     85 
     86 public:	//Accessors and Mutators
     87 	/**
     88 	 * Gets the sid attribute.
     89 	 * @return Returns a xsNCName of the sid attribute.
     90 	 */
     91 	xsNCName getSid() const { return attrSid; }
     92 	/**
     93 	 * Sets the sid attribute.
     94 	 * @param atSid The new value for the sid attribute.
     95 	 */
     96 	void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
     97 
     98 protected:
     99 	/**
    100 	 * Constructor
    101 	 */
    102 	domFx_code_profile(DAE& dae) : daeElement(dae), domFx_code_profile_complexType(dae, this) {}
    103 	/**
    104 	 * Destructor
    105 	 */
    106 	virtual ~domFx_code_profile() {}
    107 	/**
    108 	 * Overloaded assignment operator
    109 	 */
    110 	virtual domFx_code_profile &operator=( const domFx_code_profile &cpy ) { (void)cpy; return *this; }
    111 
    112 public: // STATIC METHODS
    113 	/**
    114 	 * Creates an instance of this class and returns a daeElementRef referencing it.
    115 	 * @return a daeElementRef referencing an instance of this object.
    116 	 */
    117 	static DLLSPEC daeElementRef create(DAE& dae);
    118 	/**
    119 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    120 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
    121 	 * @return A daeMetaElement describing this COLLADA element.
    122 	 */
    123 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    124 };
    125 
    126 
    127 #endif
    128