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 __DAE_META_GROUP_H__ 10 #define __DAE_META_GROUP_H__ 11 12 #include <dae/daeMetaCMPolicy.h> 13 14 class daeMetaElementAttribute; 15 16 /** 17 * The daeMetaGroup class defines the behavior of an xs:group ref content model from the COLLADA Schema. 18 */ 19 class daeMetaGroup : public daeMetaCMPolicy 20 { 21 public: 22 /** 23 * Constructor. 24 * @param econ The daeMetaElementAttribute that represents the group element in the parent. 25 * @param container The daeMetaElement that this policy object belongs to. 26 * @param parent The daeMetaCMPolicy parent of this policy object. 27 * @param odinal The ordinal value offset of this specific policy object. Used for maintaining the 28 * correct order of child elements. 29 * @param minO The minimum number of times this CMPolicy object must appear. This value comes from the COLLADA schema. 30 * @param maxO The maximum number of times this CMPolicy object may appear. This value comes from the COLLADA schema. 31 */ 32 daeMetaGroup( daeMetaElementAttribute *econ, daeMetaElement *container, daeMetaCMPolicy *parent = NULL, 33 daeUInt ordinal = 0, daeInt minO = 1, daeInt maxO = 1 ); 34 35 /** 36 * Destructor. 37 */ 38 ~daeMetaGroup(); 39 40 daeElement *placeElement( daeElement *parent, daeElement *child, daeUInt &ordinal, daeInt offset = 0, daeElement* before = NULL, daeElement *after = NULL ); 41 daeBool removeElement(daeElement* parent, daeElement* child); 42 daeMetaElement *findChild( daeString elementName ); 43 void getChildren( daeElement* parent, daeElementRefArray &array ); 44 45 protected: 46 daeMetaElementAttribute *_elementContainer; 47 }; 48 49 #endif 50 51