summaryrefslogtreecommitdiff
path: root/src/1.4/dom/domIDREF_array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/1.4/dom/domIDREF_array.cpp')
-rwxr-xr-xsrc/1.4/dom/domIDREF_array.cpp87
1 files changed, 87 insertions, 0 deletions
diff --git a/src/1.4/dom/domIDREF_array.cpp b/src/1.4/dom/domIDREF_array.cpp
new file mode 100755
index 0000000..82fcf9b
--- /dev/null
+++ b/src/1.4/dom/domIDREF_array.cpp
@@ -0,0 +1,87 @@
+/*
+* Copyright 2006 Sony Computer Entertainment Inc.
+*
+* Licensed under the MIT Open Source License, for details please see license.txt or the website
+* http://www.opensource.org/licenses/mit-license.php
+*
+*/
+
+#include <dae.h>
+#include <dae/daeDom.h>
+#include <dom/domIDREF_array.h>
+#include <dae/daeMetaCMPolicy.h>
+#include <dae/daeMetaSequence.h>
+#include <dae/daeMetaChoice.h>
+#include <dae/daeMetaGroup.h>
+#include <dae/daeMetaAny.h>
+#include <dae/daeMetaElementAttribute.h>
+
+daeElementRef
+domIDREF_array::create(DAE& dae)
+{
+ domIDREF_arrayRef ref = new domIDREF_array(dae);
+ return ref;
+}
+
+
+daeMetaElement *
+domIDREF_array::registerElement(DAE& dae)
+{
+ daeMetaElement* meta = dae.getMeta(ID());
+ if ( meta != NULL ) return meta;
+
+ meta = new daeMetaElement(dae);
+ dae.setMeta(ID(), *meta);
+ meta->setName( "IDREF_array" );
+ meta->registerClass(domIDREF_array::create);
+
+ // Add attribute: _value
+ {
+ daeMetaAttribute *ma = new daeMetaArrayAttribute;
+ ma->setName( "_value" );
+ ma->setType( dae.getAtomicTypes().get("xsIDREFS"));
+ ma->setOffset( daeOffsetOf( domIDREF_array , _value ));
+ ma->setContainer( meta );
+ meta->appendAttribute(ma);
+ }
+
+ // Add attribute: id
+ {
+ daeMetaAttribute *ma = new daeMetaAttribute;
+ ma->setName( "id" );
+ ma->setType( dae.getAtomicTypes().get("xsID"));
+ ma->setOffset( daeOffsetOf( domIDREF_array , attrId ));
+ ma->setContainer( meta );
+
+ meta->appendAttribute(ma);
+ }
+
+ // Add attribute: name
+ {
+ daeMetaAttribute *ma = new daeMetaAttribute;
+ ma->setName( "name" );
+ ma->setType( dae.getAtomicTypes().get("xsNCName"));
+ ma->setOffset( daeOffsetOf( domIDREF_array , attrName ));
+ ma->setContainer( meta );
+
+ meta->appendAttribute(ma);
+ }
+
+ // Add attribute: count
+ {
+ daeMetaAttribute *ma = new daeMetaAttribute;
+ ma->setName( "count" );
+ ma->setType( dae.getAtomicTypes().get("Uint"));
+ ma->setOffset( daeOffsetOf( domIDREF_array , attrCount ));
+ ma->setContainer( meta );
+ ma->setIsRequired( true );
+
+ meta->appendAttribute(ma);
+ }
+
+ meta->setElementSize(sizeof(domIDREF_array));
+ meta->validate();
+
+ return meta;
+}
+