Upgraded to latest COLLADA-DOM 1.2.0, see http://sourceforge.net/project/showfiles.php?group_id=157838
November 13, 2006 Re-applied the 'INF' fix for constraint limits.
This commit is contained in:
@@ -29,7 +29,7 @@ public:
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~daeDatabase() {}
|
||||
virtual DLLSPEC ~daeDatabase() {}
|
||||
|
||||
/** @name Documents */
|
||||
//@{
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
* @note The @c daeElement passed in as <tt><i>dom</i></tt> should always be a @c domCOLLADA object, the API may enforce this in the future.
|
||||
* @deprecated This function will be removed in future versions. Please use createDocument.
|
||||
*/
|
||||
virtual daeInt insertDocument(daeString name, daeElement* dom, daeDocument** document = NULL) = 0;
|
||||
virtual DLLSPEC daeInt insertDocument(daeString name, daeElement* dom, daeDocument** document = NULL) = 0;
|
||||
/**
|
||||
* Creates a new @c domCOLLADA root element and a new document; returns an error if the document name already exists.
|
||||
* @param name Name of the new document, must be a valid URI.
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
* @return Returns DAE_OK if the document was created successfully, otherwise returns a negative value as defined in daeError.h.
|
||||
* @deprecated This function will be removed in future versions. Please use createDocument.
|
||||
*/
|
||||
virtual daeInt insertDocument(daeString name, daeDocument** document = NULL) = 0;
|
||||
virtual DLLSPEC daeInt insertDocument(daeString name, daeDocument** document = NULL) = 0;
|
||||
/**
|
||||
* Creates a new document, defining its root as the <tt><i>dom</i></tt> object; returns an error if the document name already exists.
|
||||
* @param name Name of the new document, must be a valid URI.
|
||||
@@ -59,59 +59,59 @@ public:
|
||||
* @return Returns @c DAE_OK if the document was created successfully, otherwise returns a negative value as defined in daeError.h.
|
||||
* @note The @c daeElement passed in as <tt><i>dom</i></tt> should always be a @c domCOLLADA object, the API may enforce this in the future.
|
||||
*/
|
||||
virtual daeInt createDocument(daeString name, daeElement* dom, daeDocument** document = NULL) = 0;
|
||||
virtual DLLSPEC daeInt createDocument(daeString name, daeElement* dom, daeDocument** document = NULL) = 0;
|
||||
/**
|
||||
* Creates a new @c domCOLLADA root element and a new document; returns an error if the document name already exists.
|
||||
* @param name Name of the new document, must be a valid URI.
|
||||
* @param document Pointer to a @c daeDocument pointer that receives the document created
|
||||
* @return Returns DAE_OK if the document was created successfully, otherwise returns a negative value as defined in daeError.h.
|
||||
*/
|
||||
virtual daeInt createDocument(daeString name, daeDocument** document = NULL) = 0;
|
||||
virtual DLLSPEC daeInt createDocument(daeString name, daeDocument** document = NULL) = 0;
|
||||
|
||||
/**
|
||||
* Inserts an already existing document into the database.
|
||||
* @param c The document to insert.
|
||||
* @return Returns DAE_OK if the document was inserted successfully, otherwise returns a negative value as defined in daeError.h.
|
||||
*/
|
||||
virtual daeInt insertDocument( daeDocument *c ) = 0;
|
||||
virtual DLLSPEC daeInt insertDocument( daeDocument *c ) = 0;
|
||||
|
||||
/**
|
||||
* Removes a document from the database.
|
||||
* @param document Document to remove from the database
|
||||
* @return Returns DAE_OK if the document was successfully removed, otherwise returns a negative value as defined in daeError.h.
|
||||
*/
|
||||
virtual daeInt removeDocument(daeDocument* document) = 0;
|
||||
virtual DLLSPEC daeInt removeDocument(daeDocument* document) = 0;
|
||||
/**
|
||||
* Gets the number of documents.
|
||||
* @return Returns the number of documents.
|
||||
*/
|
||||
virtual daeUInt getDocumentCount() = 0;
|
||||
virtual DLLSPEC daeUInt getDocumentCount() = 0;
|
||||
/**
|
||||
* Gets a document based on the document index.
|
||||
* @param index Index of the document to get.
|
||||
* @return Returns a pointer on the document, or NULL if not found.
|
||||
*/
|
||||
virtual daeDocument* getDocument(daeUInt index) = 0;
|
||||
virtual DLLSPEC daeDocument* getDocument(daeUInt index) = 0;
|
||||
/**
|
||||
* Gets a document based on the document name.
|
||||
* @param name The name of the document as a URI.
|
||||
* @return Returns a pointer to the document, or NULL if not found.
|
||||
* @note If the URI contains a fragment, the fragment is stripped off.
|
||||
*/
|
||||
virtual daeDocument* getDocument(daeString name) = 0;
|
||||
virtual DLLSPEC daeDocument* getDocument(daeString name) = 0;
|
||||
/**
|
||||
* Gets a document name.
|
||||
* @param index Index of the document to get.
|
||||
* @return Returns the name of the document at the given index.
|
||||
*/
|
||||
virtual daeString getDocumentName(daeUInt index) = 0;
|
||||
virtual DLLSPEC daeString getDocumentName(daeUInt index) = 0;
|
||||
/**
|
||||
* Indicates if a document is loaded or not.
|
||||
* @param name Name of the document as a URI.
|
||||
* @return Returns true if the document is loaded, false otherwise.
|
||||
* @note If the URI contains a fragment, the fragment is stripped off.
|
||||
*/
|
||||
virtual daeBool isDocumentLoaded(daeString name) = 0;
|
||||
virtual DLLSPEC daeBool isDocumentLoaded(daeString name) = 0;
|
||||
//@}
|
||||
|
||||
/** @name Elements */
|
||||
@@ -120,20 +120,20 @@ public:
|
||||
* Gets the number of types in the database.
|
||||
* @return Returns the number of different types of objects inserted in the database.
|
||||
*/
|
||||
virtual daeUInt getTypeCount() = 0;
|
||||
virtual DLLSPEC daeUInt getTypeCount() = 0;
|
||||
/**
|
||||
* Retrieves the name of a type of object inserted in the database.
|
||||
* @param index Index of the type; must be between 0 and <tt> daeDatabase::getTypeCount()-1 </tt>
|
||||
* @return Returns the name of the type, NULL if the index is invalid.
|
||||
*/
|
||||
virtual daeString getTypeName(daeUInt index) = 0;
|
||||
virtual DLLSPEC daeString getTypeName(daeUInt index) = 0;
|
||||
/**
|
||||
* Inserts a @c daeElement into the runtime database.
|
||||
* @param document Document in which the @c daeElement lives.
|
||||
* @param element @c daeElement to insert in the database
|
||||
* @return Returns @c DAE_OK if element successfully inserted, otherwise returns a negative value as defined in daeError.h.
|
||||
*/
|
||||
virtual daeInt insertElement(daeDocument* document,
|
||||
virtual DLLSPEC daeInt insertElement(daeDocument* document,
|
||||
daeElement* element) = 0;
|
||||
/**
|
||||
* Removes a @c daeElement from the runtime database; not implemented in the reference STL implementation.
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
* @return Returns @c DAE_OK if element successfully removed, otherwise returns a negative value as defined in daeError.h.
|
||||
* @note This function is not implemented in the reference STL implementation.
|
||||
*/
|
||||
virtual daeInt removeElement(daeDocument* document,
|
||||
virtual DLLSPEC daeInt removeElement(daeDocument* document,
|
||||
daeElement* element) = 0;
|
||||
/**
|
||||
* Unloads all of the documents of the runtime database.
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
* except any objects on which you still have a smart pointer reference (@c daeSmartRef).
|
||||
* @return Returns @c DAE_OK if all documents successfully unloaded, otherwise returns a negative value as defined in daeError.h.
|
||||
*/
|
||||
virtual daeInt clear() = 0;
|
||||
virtual DLLSPEC daeInt clear() = 0;
|
||||
/**
|
||||
* Optimizes the database.
|
||||
* This function takes time; it is called by the interface at the end of a load operation.
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
* need to be sorted. All database search functions call @c validate(); you should not need to
|
||||
* call this function directly.
|
||||
*/
|
||||
virtual void validate() = 0;
|
||||
virtual DLLSPEC void validate() = 0;
|
||||
//@}
|
||||
|
||||
/** @name Queries */
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
* @param file Name of the document or file, for example, "myDocument.xml", can be NULL
|
||||
* @return Returns the number of elements matching this query.
|
||||
*/
|
||||
virtual daeUInt getElementCount(daeString name = NULL,
|
||||
virtual DLLSPEC daeUInt getElementCount(daeString name = NULL,
|
||||
daeString type = NULL,
|
||||
daeString file = NULL) = 0;
|
||||
/**
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
* @param file Name of the document or file, for example, "myDocument.xml", can be NULL
|
||||
* @return Returns DAE_OK upon success, returns DAE_ERR_QUERY_NO_MATCH if there is no match, otherwise, returns a negative value as defined in daeError.h.
|
||||
*/
|
||||
virtual daeInt getElement(daeElement** pElement,
|
||||
virtual DLLSPEC daeInt getElement(daeElement** pElement,
|
||||
daeInt index,
|
||||
daeString name = NULL,
|
||||
daeString type = NULL,
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
* @return Returns DAE_OK if it succeeds, returns DAE_ERR_QUERY_NO_MATCH if there is no match, otherwise returns a negative value as defined in daeError.h.
|
||||
* @note This function is not implemented.
|
||||
*/
|
||||
virtual daeInt queryElement(daeElement** pElement, daeString genericQuery) = 0;
|
||||
virtual DLLSPEC daeInt queryElement(daeElement** pElement, daeString genericQuery) = 0;
|
||||
//@}
|
||||
|
||||
/**
|
||||
@@ -222,40 +222,40 @@ public:
|
||||
* @param _topMeta Top meta object to use to create objects to fill the database.
|
||||
* @return Returns DAE_OK if successful, otherwise returns a negative value defined in daeError.h.
|
||||
*/
|
||||
virtual daeInt setMeta(daeMetaElement *_topMeta) = 0;
|
||||
virtual DLLSPEC daeInt setMeta(daeMetaElement *_topMeta) = 0;
|
||||
|
||||
public: //Depricated methods
|
||||
inline daeInt insertCollection(daeString name, daeElement* dom, daeDocument** document = NULL) {
|
||||
inline DLLSPEC daeInt insertCollection(daeString name, daeElement* dom, daeDocument** document = NULL) {
|
||||
return insertDocument( name, dom, document );
|
||||
}
|
||||
inline daeInt insertCollection(daeString name, daeDocument** document = NULL) {
|
||||
inline DLLSPEC daeInt insertCollection(daeString name, daeDocument** document = NULL) {
|
||||
return insertDocument( name, document );
|
||||
}
|
||||
inline daeInt createCollection(daeString name, daeElement* dom, daeDocument** document = NULL) {
|
||||
inline DLLSPEC daeInt createCollection(daeString name, daeElement* dom, daeDocument** document = NULL) {
|
||||
return createDocument( name, dom, document );
|
||||
}
|
||||
inline daeInt createCollection(daeString name, daeDocument** document = NULL) {
|
||||
inline DLLSPEC daeInt createCollection(daeString name, daeDocument** document = NULL) {
|
||||
return createDocument( name, document );
|
||||
}
|
||||
inline daeInt insertCollection( daeDocument *c ) {
|
||||
inline DLLSPEC daeInt insertCollection( daeDocument *c ) {
|
||||
return insertDocument( c );
|
||||
}
|
||||
inline daeInt removeCollection(daeDocument* document) {
|
||||
inline DLLSPEC daeInt removeCollection(daeDocument* document) {
|
||||
return removeDocument( document );
|
||||
}
|
||||
inline daeUInt getCollectionCount() {
|
||||
inline DLLSPEC daeUInt getCollectionCount() {
|
||||
return getDocumentCount();
|
||||
}
|
||||
inline daeDocument* getCollection(daeUInt index) {
|
||||
inline DLLSPEC daeDocument* getCollection(daeUInt index) {
|
||||
return getDocument( index );
|
||||
}
|
||||
inline daeDocument* getCollection(daeString name) {
|
||||
inline DLLSPEC daeDocument* getCollection(daeString name) {
|
||||
return getDocument( name );
|
||||
}
|
||||
inline daeString getCollectionName(daeUInt index) {
|
||||
inline DLLSPEC daeString getCollectionName(daeUInt index) {
|
||||
return getDocumentName( index );
|
||||
}
|
||||
inline daeBool isCollectionLoaded(daeString name) {
|
||||
inline DLLSPEC daeBool isCollectionLoaded(daeString name) {
|
||||
return isDocumentLoaded( name );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user