A collada dom example from where I got the code. More...
#include <cstdarg>#include <iostream>#include <iomanip>#include <string>#include <sstream>#include <memory>#include <map>#include <vector>#include <set>#include <dae.h>#include <cstddef>#include <utility>#include <features.h>#include <bits/wordsize.h>#include <gnu/stubs-32.h>#include <boost/config.hpp>#include <stdexcept>#include <cassert>#include <boost/config/auto_link.hpp>#include <limits>#include <limits.h>#include <iterator>#include <boost/detail/workaround.hpp>#include <ostream>#include <functional>#include <cerrno>#include <boost/iterator.hpp>#include <boost/mpl/aux_/config/gcc.hpp>#include <boost/mpl/aux_/config/workaround.hpp>#include <boost/mpl/aux_/adl_barrier.hpp>#include <boost/mpl/aux_/config/static_constant.hpp>#include <boost/mpl/bool.hpp>#include <boost/mpl/aux_/config/msvc.hpp>#include <boost/mpl/aux_/config/ctps.hpp>#include <boost/mpl/integral_c_tag.hpp>#include <boost/mpl/aux_/nttp_decl.hpp>#include <boost/mpl/aux_/config/ttp.hpp>#include <boost/mpl/int.hpp>#include <boost/mpl/aux_/na.hpp>#include <boost/mpl/aux_/template_arity_fwd.hpp>#include <boost/preprocessor/cat.hpp>#include <boost/mpl/aux_/config/preprocessor.hpp>#include <boost/mpl/aux_/config/dtp.hpp>#include <boost/preprocessor/config/config.hpp>#include <boost/preprocessor/logical/bool.hpp>#include <boost/preprocessor/facilities/empty.hpp>#include <boost/mpl/aux_/lambda_arity_param.hpp>#include <boost/mpl/aux_/config/lambda.hpp>#include <boost/type_traits/config.hpp>#include <boost/mpl/aux_/preprocessor/params.hpp>#include <boost/mpl/aux_/config/overload_resolution.hpp>#include <boost/mpl/aux_/integral_wrapper.hpp>#include <boost/mpl/aux_/lambda_support.hpp>#include <boost/type_traits/detail/bool_trait_def.hpp>#include <boost/type_traits/detail/bool_trait_undef.hpp>#include <boost/type_traits/detail/template_arity_spec.hpp>#include <boost/type_traits/detail/yes_no_type.hpp>#include <boost/type_traits/detail/ice_or.hpp>#include <boost/type_traits/intrinsics.hpp>#include <boost/type_traits/detail/type_trait_def.hpp>#include <boost/type_traits/detail/type_trait_undef.hpp>#include <boost/type_traits/detail/ice_and.hpp>#include <boost/type_traits/detail/ice_not.hpp>#include <boost/detail/iterator.hpp>#include <boost/iterator/detail/config_def.hpp>#include <boost/mpl/aux_/static_cast.hpp>#include <boost/mpl/aux_/config/eti.hpp>#include <boost/mpl/aux_/na_spec.hpp>#include <boost/mpl/aux_/config/integral.hpp>#include <boost/mpl/aux_/nested_type_wknd.hpp>#include <boost/mpl/aux_/value_wknd.hpp>#include <boost/mpl/aux_/config/nttp.hpp>#include <boost/mpl/limits/arity.hpp>#include <boost/mpl/aux_/arity.hpp>#include <boost/mpl/aux_/config/use_preprocessed.hpp>#include <boost/mpl/aux_/include_preprocessed.hpp>#include <boost/type_traits/is_convertible.hpp>#include <boost/static_assert.hpp>#include <boost/iterator/detail/config_undef.hpp>#include <boost/mpl/or.hpp>#include <boost/mpl/if.hpp>#include <boost/mpl/eval_if.hpp>#include <boost/mpl/identity.hpp>#include <boost/mpl/assert.hpp>#include <boost/type_traits/detail/cv_traits_impl.hpp>#include <boost/type_traits/is_reference.hpp>#include <boost/type_traits/is_same.hpp>#include <boost/type_traits/remove_cv.hpp>#include <boost/type_traits/is_class.hpp>#include <boost/type_traits/is_const.hpp>#include <boost/type_traits/is_member_function_pointer.hpp>#include <boost/type_traits/is_member_pointer.hpp>#include <boost/type_traits/broken_compiler_spec.hpp>#include <boost/mpl/and.hpp>#include <boost/mpl/not.hpp>#include <boost/type_traits/remove_reference.hpp>#include <boost/type_traits/is_volatile.hpp>#include <boost/type_traits/is_void.hpp>#include <boost/type_traits/is_arithmetic.hpp>#include <boost/type_traits/add_reference.hpp>#include <boost/type_traits/is_array.hpp>#include <boost/type_traits/is_union.hpp>#include <boost/type_traits/is_pointer.hpp>#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>#include <boost/mpl/aux_/arity_spec.hpp>#include <boost/mpl/aux_/yes_no.hpp>#include <boost/mpl/aux_/config/has_xxx.hpp>#include <boost/mpl/placeholders.hpp>#include <boost/mpl/lambda_fwd.hpp>#include <boost/mpl/apply_wrap.hpp>#include <boost/mpl/aux_/type_wrapper.hpp>#include <boost/mpl/aux_/config/bind.hpp>#include <boost/mpl/bind_fwd.hpp>#include <boost/mpl/protect.hpp>#include <boost/mpl/void_fwd.hpp>#include <boost/mpl/has_xxx.hpp>#include <boost/mpl/arg.hpp>#include <boost/mpl/int_fwd.hpp>#include <exception>#include <boost/assert.hpp>#include <boost/throw_exception.hpp>#include <boost/checked_delete.hpp>#include <typeinfo>#include <boost/smart_ptr/detail/sp_counted_base.hpp>#include <boost/config/no_tr1/memory.hpp>#include <new>#include <boost/smart_ptr/detail/sp_has_sync.hpp>#include <algorithm>#include <iosfwd>#include <locale>#include <boost/config/abi_prefix.hpp>#include <boost/config/abi_suffix.hpp>#include <boost/shared_ptr.hpp>#include <boost/utility/enable_if.hpp>#include <boost/cstdint.hpp>#include <ctime>#include <boost/system/error_code.hpp>#include <stack>#include <bits/types.h>#include <stddef.h>#include <time.h>#include <stdarg.h>#include <sys/types.h>#include <assert.h>#include <wchar.h>#include <dae/daePlatform.h>#include <dae/daeTypes.h>#include <dae/daeArray.h>#include <dae/daeError.h>#include <dae.h>#include <dae/daeMemorySystem.h>#include <dae/daeRefCountedObj.h>#include <dae/daeSmartRef.h>#include <dae/daeElement.h>#include <list>#include <dae/daeURI.h>#include <dae/daeStringRef.h>#include <dae/daeArrayTypes.h>#include <dae/daeAtomicType.h>#include <dae/daeUtils.h>#include <dae/daeMetaElement.h>#include <dae/daeIDRef.h>#include <dae/daeDocument.h>#include <dae/daeDomTypes.h>#include <dom/domTypes.h>#include <dom/domElements.h>#include <dom/domAsset.h>#include <dom/domTechnique.h>#include <dom/domAnimation.h>#include <dom/domExtra.h>#include <dom/domSource.h>#include <dom/domInput_local.h>#include <dom/domInput_local_offset.h>#include <dom/domP.h>#include <dom/domVertices.h>#include <dom/domLines.h>#include <dom/domLinestrips.h>#include <dom/domPolygons.h>#include <dom/domPolylist.h>#include <dom/domTriangles.h>#include <dom/domTrifans.h>#include <dom/domTristrips.h>#include <dom/domCurve.h>#include <dom/domOrient.h>#include <dom/domOrigin.h>#include <dom/domInstance_with_extra.h>#include <dom/domFx_sampler.h>#include <dom/domFx_common_color_or_texture.h>#include <dom/domFx_sampler2D.h>#include <dom/domGles2_value.h>#include <dom/domFx_annotate.h>#include <dom/domFx_target.h>#include <dom/domInstance_image.h>#include <dom/domFx_rendertarget.h>#include <dom/domFx_code.h>#include <dom/domFx_include.h>#include <dom/domFx_sampler3D.h>#include <dom/domFx_samplerCUBE.h>#include <dom/domFx_samplerDEPTH.h>#include <dom/domGlsl_value.h>#include <dom/domFx_sampler1D.h>#include <dom/domFx_samplerRECT.h>#include <dom/domFx_sources.h>#include <dom/domFx_colortarget.h>#include <dom/domFx_depthtarget.h>#include <dom/domFx_stenciltarget.h>#include <dom/domFx_clearcolor.h>#include <dom/domFx_cleardepth.h>#include <dom/domFx_clearstencil.h>#include <dom/domCg_param.h>#include <dom/domGl_pipeline_settings.h>#include <dom/domGles_texture_constant.h>#include <dom/domTargetable_float.h>#include <dom/domFx_sampler_states.h>#include <dom/domTargetable_float4.h>#include <dom/domTargetable_float3.h>#include <dom/domParam.h>#include <dom/domBind_material.h>#include <dom/domNode.h>#include <dom/domTranslate.h>#include <dom/domRotate.h>#include <dom/domPhysics_material.h>#include <dom/domInstance_geometry.h>#include <dom/domPlane.h>#include <dom/domSphere.h>#include <dom/domInstance_physics_material.h>#include <dom/domBox.h>#include <dom/domCylinder.h>#include <dom/domCapsule.h>#include <dom/domInstance_force_field.h>#include <dom/domInstance_physics_model.h>#include <dom/domJoint.h>#include <dom/domLink.h>#include <dom/domInstance_formula.h>#include <dom/domKinematics_newparam.h>#include <dom/domKinematics_connect_param.h>#include <dom/domCommon_param.h>#include <dom/domCommon_float_or_param.h>#include <dom/domFormula.h>#include <dom/domKinematics_bind.h>#include <dom/domKinematics_setparam.h>#include <dom/domInstance_kinematics_model.h>#include <dom/domInstance_articulated_system.h>#include <dom/domCommon_sidref_or_param.h>#include <dom/domProfile_common.h>#include <dae/daeSIDResolver.h>#include <dom/domInstance_controller.h>#include <dom/domImage.h>#include <dae/daeErrorHandler.h>
Go to the source code of this file.
Classes | |
| struct | tmpDir |
Defines | |
| #define | CheckResultWithMsg(val, msg) |
| #define | CompareDocs(dae, file1, file2) |
| #define | RunTest(testName) |
Functions | |
| bool | checkTests (const set< string > &tests) |
| string | chopWS (const string &s) |
| fs::path & | dataPath () |
| DefineTest (zaeIllegalArchive) | |
| DefineTest (zaeLoading) | |
| DefineTest (spuriousQuotes) | |
| DefineTest (badFileLoad) | |
| DefineTest (uriCopy) | |
| DefineTest (charEncodingSetting) | |
| DefineTest (externalRef) | |
| DefineTest (getElementBug) | |
| DefineTest (charEncoding) | |
| DefineTest (zipFile) | |
| DefineTest (fileExtension) | |
| DefineTest (databaseLookup) | |
| DefineTest (baseURI) | |
| DefineTest (autoResolve) | |
| DefineTest (domFx_common_transparent) | |
| DefineTest (unusedTypeCheck) | |
| DefineTest (multipleDae) | |
| DefineTest (xmlNavigation) | |
| DefineTest (uriBase) | |
| DefineTest (uriOps) | |
| DefineTest (libxmlUriBugWorkaround) | |
| DefineTest (nativePathConversion) | |
| DefineTest (placeElement) | |
| DefineTest (seymourSidResolve) | |
| DefineTest (stringTable) | |
| DefineTest (badSkew) | |
| DefineTest (genericOps) | |
| DefineTest (clone) | |
| DefineTest (atomicTypeOps) | |
| DefineTest (arrayOps) | |
| DefineTest (nameArray) | |
| DefineTest (removeElement) | |
| DefineTest (getTexture) | |
| DefineTest (sidResolve) | |
| DefineTest (extraTypeTest) | |
| DefineTest (rawSupport) | |
| DefineTest (roundTripSeymour) | |
| DefineTest (writeCamera) | |
| DefineTest (compareElements) | |
| DefineTest (renderStates) | |
| DefineTest (loadClipPlane) | |
| DefineTest (elementAddFunctions) | |
| DefineTest (utils) | |
| DefineTest (chopWS) | |
| daeElement * | findAncestorByType (daeElement *el, daeString type) |
| daeElement * | findChildByName (daeElement *el, daeString name) |
| string | getCharData (daeElement *el) |
| vector< string > | getChildNames (daeElement *elt) |
| string | getRoundTripFile (const string &name) |
| daeArray * | getSkewArray (daeElement *node, const string &sid) |
| daeURI * | getTextureUri (const string &samplerSid, daeElement &effect) |
| string | getTmpFile (const string &fileName) |
| string | lookupTestFile (const string &fileName) |
| int | main (int argc, char *argv[]) |
| daeTArray< int > | makeIntArray (int i,...) |
| void | nameArrayAppend (domList_of_names &names, const char *name) |
| void | nameArraySet (domList_of_names &names, size_t index, const char *name) |
| void | printMemoryToStringResult (daeAtomicType &type, daeMemoryRef value) |
| bool | printTestResults (const map< string, testResult > &failedTests) |
| map< string, domTest * > & | registeredTests () |
| daeElement * | resolveID (daeString id, daeDocument &document) |
| string | resolveResultToString (const string &sidRef, daeElement *refElt) |
| daeElement * | resolveSid (const string &sid, daeElement &refElt) |
| bool | roundTrip (const string &file) |
| map< string, testResult > | runTests (const set< string > &tests) |
| fs::path & | tmpPath () |
| float | toFloat (const string &s) |
| string | toString (daeAtomicType &type, daeMemoryRef value) |
A collada dom example from where I got the code.
Definition in file domTest.cpp.
| #define CheckResultWithMsg | ( | val, | |||
| msg | ) |
if (!(val)) { \ return testResult(false, __FILE__, __LINE__, msg); \ }
Definition at line 57 of file domTest.cpp.
| #define CompareDocs | ( | dae, | |||
| file1, | |||||
| file2 | ) |
{ \
domCOLLADA *root1 = (dae).getRoot(file1), \
*root2 = (dae).getRoot(file2); \
daeElement::compareResult result = daeElement::compareWithFullResult(*root1, *root2); \
if (result.compareValue != 0) { \
return testResult(false, __FILE__, __LINE__, result.format()); \
} \
}
Definition at line 62 of file domTest.cpp.
| #define RunTest | ( | testName | ) |
{ \
map<string, domTest*>::iterator iter = registeredTests().find(#testName); \
CheckResult(iter != registeredTests().end()); \
CheckResult(iter->second->run()); \
}
Definition at line 87 of file domTest.cpp.
| bool checkTests | ( | const set< string > & | tests | ) |
Definition at line 1503 of file domTest.cpp.
| string chopWS | ( | const string & | s | ) |
Definition at line 104 of file domTest.cpp.
| fs::path& dataPath | ( | ) |
Definition at line 77 of file domTest.cpp.
| DefineTest | ( | zaeIllegalArchive | ) |
Definition at line 1484 of file domTest.cpp.
| DefineTest | ( | zaeLoading | ) |
Definition at line 1446 of file domTest.cpp.
| DefineTest | ( | spuriousQuotes | ) |
Definition at line 1439 of file domTest.cpp.
| DefineTest | ( | badFileLoad | ) |
Definition at line 1432 of file domTest.cpp.
| DefineTest | ( | uriCopy | ) |
Definition at line 1420 of file domTest.cpp.
| DefineTest | ( | charEncodingSetting | ) |
Definition at line 1408 of file domTest.cpp.
| DefineTest | ( | externalRef | ) |
Definition at line 1395 of file domTest.cpp.
| DefineTest | ( | getElementBug | ) |
Definition at line 1359 of file domTest.cpp.
| DefineTest | ( | charEncoding | ) |
Definition at line 1344 of file domTest.cpp.
| DefineTest | ( | zipFile | ) |
Definition at line 1335 of file domTest.cpp.
| DefineTest | ( | fileExtension | ) |
Definition at line 1323 of file domTest.cpp.
| DefineTest | ( | databaseLookup | ) |
Definition at line 1291 of file domTest.cpp.
| DefineTest | ( | baseURI | ) |
Definition at line 1280 of file domTest.cpp.
| DefineTest | ( | autoResolve | ) |
Definition at line 1209 of file domTest.cpp.
| DefineTest | ( | domFx_common_transparent | ) |
Definition at line 1192 of file domTest.cpp.
| DefineTest | ( | unusedTypeCheck | ) |
Definition at line 1153 of file domTest.cpp.
| DefineTest | ( | multipleDae | ) |
Definition at line 1142 of file domTest.cpp.
| DefineTest | ( | xmlNavigation | ) |
Definition at line 1114 of file domTest.cpp.
| DefineTest | ( | uriBase | ) |
Definition at line 1104 of file domTest.cpp.
| DefineTest | ( | uriOps | ) |
Definition at line 916 of file domTest.cpp.
| DefineTest | ( | libxmlUriBugWorkaround | ) |
Definition at line 879 of file domTest.cpp.
| DefineTest | ( | nativePathConversion | ) |
Definition at line 849 of file domTest.cpp.
| DefineTest | ( | placeElement | ) |
Definition at line 826 of file domTest.cpp.
| DefineTest | ( | seymourSidResolve | ) |
Definition at line 794 of file domTest.cpp.
| DefineTest | ( | stringTable | ) |
Definition at line 763 of file domTest.cpp.
| DefineTest | ( | badSkew | ) |
Definition at line 744 of file domTest.cpp.
| DefineTest | ( | genericOps | ) |
Definition at line 669 of file domTest.cpp.
| DefineTest | ( | clone | ) |
Definition at line 655 of file domTest.cpp.
| DefineTest | ( | atomicTypeOps | ) |
Definition at line 598 of file domTest.cpp.
| DefineTest | ( | arrayOps | ) |
Definition at line 564 of file domTest.cpp.
| DefineTest | ( | nameArray | ) |
Definition at line 541 of file domTest.cpp.
| DefineTest | ( | removeElement | ) |
Definition at line 513 of file domTest.cpp.
| DefineTest | ( | getTexture | ) |
Definition at line 497 of file domTest.cpp.
| DefineTest | ( | sidResolve | ) |
Definition at line 397 of file domTest.cpp.
| DefineTest | ( | extraTypeTest | ) |
Definition at line 338 of file domTest.cpp.
| DefineTest | ( | rawSupport | ) |
Definition at line 313 of file domTest.cpp.
| DefineTest | ( | roundTripSeymour | ) |
Definition at line 301 of file domTest.cpp.
| DefineTest | ( | writeCamera | ) |
Definition at line 269 of file domTest.cpp.
| DefineTest | ( | compareElements | ) |
Definition at line 239 of file domTest.cpp.
| DefineTest | ( | renderStates | ) |
Definition at line 201 of file domTest.cpp.
| DefineTest | ( | loadClipPlane | ) |
Definition at line 194 of file domTest.cpp.
| DefineTest | ( | elementAddFunctions | ) |
Definition at line 149 of file domTest.cpp.
| DefineTest | ( | utils | ) |
Definition at line 125 of file domTest.cpp.
| DefineTest | ( | chopWS | ) |
Definition at line 113 of file domTest.cpp.
| daeElement* findAncestorByType | ( | daeElement * | el, | |
| daeString | type | |||
| ) |
Definition at line 469 of file domTest.cpp.
| daeElement* findChildByName | ( | daeElement * | el, | |
| daeString | name | |||
| ) |
Definition at line 457 of file domTest.cpp.
| string getCharData | ( | daeElement * | el | ) |
Definition at line 483 of file domTest.cpp.
| vector<string> getChildNames | ( | daeElement * | elt | ) |
Definition at line 814 of file domTest.cpp.
| string getRoundTripFile | ( | const string & | name | ) |
Definition at line 290 of file domTest.cpp.
| daeArray* getSkewArray | ( | daeElement * | node, | |
| const string & | sid | |||
| ) |
Definition at line 733 of file domTest.cpp.
| daeURI* getTextureUri | ( | const string & | samplerSid, | |
| daeElement & | effect | |||
| ) |
Definition at line 487 of file domTest.cpp.
| string getTmpFile | ( | const string & | fileName | ) |
Definition at line 99 of file domTest.cpp.
| string lookupTestFile | ( | const string & | fileName | ) |
Definition at line 95 of file domTest.cpp.
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 1573 of file domTest.cpp.
| daeTArray<int> makeIntArray | ( | int | i, | |
| ... | ||||
| ) |
Definition at line 552 of file domTest.cpp.
| void nameArrayAppend | ( | domList_of_names & | names, | |
| const char * | name | |||
| ) |
Definition at line 536 of file domTest.cpp.
| void nameArraySet | ( | domList_of_names & | names, | |
| size_t | index, | |||
| const char * | name | |||
| ) |
Definition at line 532 of file domTest.cpp.
| void printMemoryToStringResult | ( | daeAtomicType & | type, | |
| daeMemoryRef | value | |||
| ) |
Definition at line 586 of file domTest.cpp.
| bool printTestResults | ( | const map< string, testResult > & | failedTests | ) |
Definition at line 1530 of file domTest.cpp.
| map<string, domTest*>& registeredTests | ( | ) |
Definition at line 72 of file domTest.cpp.
| daeElement* resolveID | ( | daeString | id, | |
| daeDocument & | document | |||
| ) |
Definition at line 475 of file domTest.cpp.
| string resolveResultToString | ( | const string & | sidRef, | |
| daeElement * | refElt | |||
| ) |
Definition at line 389 of file domTest.cpp.
| daeElement* resolveSid | ( | const string & | sid, | |
| daeElement & | refElt | |||
| ) |
Definition at line 479 of file domTest.cpp.
| bool roundTrip | ( | const string & | file | ) |
Definition at line 294 of file domTest.cpp.
| map<string, testResult> runTests | ( | const set< string > & | tests | ) |
Definition at line 1518 of file domTest.cpp.
| fs::path& tmpPath | ( | ) |
Definition at line 82 of file domTest.cpp.
| float toFloat | ( | const string & | s | ) |
Definition at line 50 of file domTest.cpp.
| string toString | ( | daeAtomicType & | type, | |
| daeMemoryRef | value | |||
| ) |
Definition at line 592 of file domTest.cpp.