x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
daeMetaElementAttribute.h - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\DarkPuzzle\libs\bullet_sdk\Extras\COLLADA_DOM\include\dae\daeMetaElementAttribute.h
旋转
特效
属性
历史版本
/* * Copyright 2006 Sony Computer Entertainment Inc. * * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: * http://research.scea.com/scea_shared_source_license.html * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing permissions and limitations under the * License. */ #ifndef __DAE_META_ELEMENT_ATTRIBUTE_H__ #define __DAE_META_ELEMENT_ATTRIBUTE_H__ #include
#include
#include
class daeMetaElement; class daeElement; class daeDocument; /** * The @c daeMetaElementAttribute class represents a content model object that is an element. */ class daeMetaElementAttribute : public daeMetaAttribute, public daeMetaCMPolicy { public: /** The metaElement that describes the element type of this attribute */ daeMetaElement* _elementType; public: /** * Constructor. * @param container The daeMetaElement that this policy object belongs to. * @param parent The daeMetaCMPolicy parent of this policy object. * @param odinal The ordinal value offset of this specific policy object. Used for maintaining the * correct order of child elements. * @param minO The minimum number of times this CMPolicy object must appear. This value comes from the COLLADA schema. * @param maxO The maximum number of times this CMPolicy object may appear. This value comes from the COLLADA schema. */ daeMetaElementAttribute( daeMetaElement *container, daeMetaCMPolicy *parent = NULL, daeUInt ordinal = 0, daeInt minO = 1, daeInt maxO = 1); /** * Destructor */ virtual ~daeMetaElementAttribute(); public: virtual daeElement *placeElement(daeElement* parent, daeElement* child, daeUInt &ordinal, daeInt offset = 0, daeElement* before = NULL, daeElement *after = NULL); virtual daeBool removeElement(daeElement* parent, daeElement* child); daeMetaElement *findChild( daeString elementName ); virtual void getChildren( daeElement* parent, daeElementRefArray &array ); public: /** * Sets the element type for the element that this attribute points to. * @param elementType @c daeMetaElement representing the type. */ void setElementType(daeMetaElement *elementType) { _elementType = elementType; } /** * Gets the element type for the element that this attribute points to. * @return Returns the @c daeMetaElement representing the type. */ daeMetaElement* getElementType() { return _elementType; } /** * Sets the database document associated with this element. * @param parent The daeElement to set the document. * @param c The @c daeDocument to associate with this element. */ virtual void setDocument(daeElement *parent, daeDocument* c ); inline void setCollection(daeElement *parent, daeDocument* c ) { setDocument( parent, c ); } /** * Gets the number of elements associated with this attribute in instance
e.
* @param e Containing element to run the operation on. * @return Returns the number of elements associated with this attribute * in instance
e.
*/ virtual daeInt getCount(daeElement* e); /** * Gets an element from containing element
e
based on
index.
* @param e Containing element from which to get the element. * @param index Index of the element to retrieve if indeed * there is an array of elements rather than a singleton. * @return Returns the associated element out of parent element e, based on index, if necessary. */ virtual daeMemoryRef get(daeElement* e, daeInt index); /** * Defines the override version of base method. * @param element Element on which to set this attribute. * @param s String containing the value to be converted via the * atomic type system. */ virtual void set(daeElement* element, daeString s); /** * Defines the override version of base method. * @param toElement Pointer to a @c daeElement to copy this attribute to. * @param fromElement Pointer to a @c daeElement to copy this attribute from. */ virtual void copy(daeElement* toElement, daeElement* fromElement); /** * Gets if this attribute is an array attribute. * @return Returns true if this attribute is an array type. */ virtual daeBool isArrayAttribute() { return false; } }; typedef daeSmartRef
daeMetaElementAttributeRef; typedef daeTArray
daeMetaElementAttributeArray; /** * The @c daeMetaElementArrayAttribute class is similar to daeMetaElementAttribute * except that this meta attribute describes an array of elements rather than a singleton. */ class daeMetaElementArrayAttribute : public daeMetaElementAttribute { public: /** * Constructor. * @param container The daeMetaElement that this policy object belongs to. * @param parent The daeMetaCMPolicy parent of this policy object. * @param odinal The ordinal value offset of this specific policy object. Used for maintaining the * correct order of child elements. * @param minO The minimum number of times this CMPolicy object must appear. This value comes from the COLLADA schema. * @param maxO The maximum number of times this CMPolicy object may appear. This value comes from the COLLADA schema. */ daeMetaElementArrayAttribute(daeMetaElement *container, daeMetaCMPolicy *parent = NULL, daeUInt ordinal = 0, daeInt minO = 1, daeInt maxO = 1); ~daeMetaElementArrayAttribute(); public: virtual daeElement *placeElement(daeElement* parent, daeElement* child, daeUInt &ordinal, daeInt offset = 0, daeElement* before = NULL, daeElement *after = NULL); virtual daeBool removeElement(daeElement* parent, daeElement* child); void getChildren( daeElement* parent, daeElementRefArray &array ); /** * Sets the database document associated with this element. * @param c The @c daeDocument to associate with this element. */ virtual void setDocument(daeElement *parent, daeDocument* c ); inline void setCollection(daeElement *parent, daeDocument* c ) { setDocument( parent, c ); } /** * Defines the override version of this method from @c daeMetaElement. * @param e Containing element to run the operation on. * @return Returns the number of particles associated with this attribute * in instance
e.
*/ virtual daeInt getCount(daeElement* e); /** * Defines the override version of this method from @c daeMetaElement. * @param e Containing element from which to get the element. * @param index Index of the particle to retrieve if indeed * there is an array of elements rather than a singleton. * @return Returns the associated particle out of parent element e, based on index, if necessary. */ virtual daeMemoryRef get(daeElement* e, daeInt index); /** * Defines the override version of this method from @c daeMetaElement. * @param toElement Pointer to a @c daeElement to copy this attribute to. * @param fromElement Pointer to a @c daeElement to copy this attribute from. */ virtual void copy(daeElement* toElement, daeElement* fromElement); /** * Gets if this attribute is an array attribute. * @return Returns true if this attribute is an array type. */ virtual daeBool isArrayAttribute() { return true; } }; typedef daeSmartRef
daeMetaElementArrayAttributeRef; typedef daeTArray
daeMetaElementArrayAttributeArray; #endif
daeMetaElementAttribute.h
网页地址
文件地址
上一页
23/33
下一页
下载
( 7 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.