/home/laradmin/lar/utils/wrapper_collada/src/mytest.cpp File Reference

A simple test file. First try. Don't remember much else. More...

#include <cstdarg>
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <memory>
#include <map>
#include <vector>
#include <set>
#include <dae.h>
#include <dom/domConstants.h>
#include <dom/domCOLLADA.h>
#include <dom/domProfile_common.h>
#include <dae/daeSIDResolver.h>
#include <dom/domInstance_controller.h>
#include <dae/domAny.h>
#include <dae/daeErrorHandler.h>
#include <dae/daeUtils.h>
#include <dom/domImage.h>
#include <modules/stdErrPlugin.h>
#include <dom/domEllipsoid.h>
#include <dom/domInput_global.h>
#include <dom/domAsset.h>
#include <dom/domLimits_sub.h>
#include "domTest.h"
Include dependency graph for mytest.cpp:

Go to the source code of this file.

Classes

struct  tmpDir

Defines

#define CheckResultWithMsg(val, msg)
#define CompareDocs(dae, file1, file2)
#define PFLN   {printf("DEBUG PRINT FILE %s LINE %d\n",__FILE__,__LINE__);}
#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 my_addEffect (daeElement *root)
void my_addGeometry (daeElement *root)
void my_addImage (daeElement *root)
void my_addMaterial (daeElement *root)
void my_addSource (daeElement *mesh, const std::string &srcID, const std::string &paramNames, domFloat values[], int valueCount)
void my_addVisualScene (daeElement *root)
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)
template<typename T >
daeTArray< T > rawArrayToDaeArray (T rawArray[], size_t count)
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)

Detailed Description

A simple test file. First try. Don't remember much else.

Definition in file mytest.cpp.


Define Documentation

#define CheckResultWithMsg ( val,
msg   ) 
Value:
if (!(val)) { \
                return testResult(false, __FILE__, __LINE__, msg); \
        }

Definition at line 93 of file mytest.cpp.

#define CompareDocs ( dae,
file1,
file2   ) 
Value:
{ \
        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 98 of file mytest.cpp.

#define PFLN   {printf("DEBUG PRINT FILE %s LINE %d\n",__FILE__,__LINE__);}

Definition at line 59 of file mytest.cpp.

#define RunTest ( testName   ) 
Value:
{ \
        map<string, domTest*>::iterator iter = registeredTests().find(#testName); \
        CheckResult(iter != registeredTests().end()); \
        CheckResult(iter->second->run()); \
}

Definition at line 123 of file mytest.cpp.


Function Documentation

bool checkTests ( const set< string > &  tests  ) 

Definition at line 1539 of file mytest.cpp.

string chopWS ( const string &  s  ) 

Definition at line 140 of file mytest.cpp.

fs::path& dataPath (  ) 

Definition at line 113 of file mytest.cpp.

DefineTest ( zaeIllegalArchive   ) 

Definition at line 1520 of file mytest.cpp.

DefineTest ( zaeLoading   ) 

Definition at line 1482 of file mytest.cpp.

DefineTest ( spuriousQuotes   ) 

Definition at line 1475 of file mytest.cpp.

DefineTest ( badFileLoad   ) 

Definition at line 1468 of file mytest.cpp.

DefineTest ( uriCopy   ) 

Definition at line 1456 of file mytest.cpp.

DefineTest ( charEncodingSetting   ) 

Definition at line 1444 of file mytest.cpp.

DefineTest ( externalRef   ) 

Definition at line 1431 of file mytest.cpp.

DefineTest ( getElementBug   ) 

Definition at line 1395 of file mytest.cpp.

DefineTest ( charEncoding   ) 

Definition at line 1380 of file mytest.cpp.

DefineTest ( zipFile   ) 

Definition at line 1371 of file mytest.cpp.

DefineTest ( fileExtension   ) 

Definition at line 1359 of file mytest.cpp.

DefineTest ( databaseLookup   ) 

Definition at line 1327 of file mytest.cpp.

DefineTest ( baseURI   ) 

Definition at line 1316 of file mytest.cpp.

DefineTest ( autoResolve   ) 

Definition at line 1245 of file mytest.cpp.

DefineTest ( domFx_common_transparent   ) 

Definition at line 1228 of file mytest.cpp.

DefineTest ( unusedTypeCheck   ) 

Definition at line 1189 of file mytest.cpp.

DefineTest ( multipleDae   ) 

Definition at line 1178 of file mytest.cpp.

DefineTest ( xmlNavigation   ) 

Definition at line 1150 of file mytest.cpp.

DefineTest ( uriBase   ) 

Definition at line 1140 of file mytest.cpp.

DefineTest ( uriOps   ) 

Definition at line 952 of file mytest.cpp.

DefineTest ( libxmlUriBugWorkaround   ) 

Definition at line 915 of file mytest.cpp.

DefineTest ( nativePathConversion   ) 

Definition at line 885 of file mytest.cpp.

DefineTest ( placeElement   ) 

Definition at line 862 of file mytest.cpp.

DefineTest ( seymourSidResolve   ) 

Definition at line 830 of file mytest.cpp.

DefineTest ( stringTable   ) 

Definition at line 799 of file mytest.cpp.

DefineTest ( badSkew   ) 

Definition at line 780 of file mytest.cpp.

DefineTest ( genericOps   ) 

Definition at line 705 of file mytest.cpp.

DefineTest ( clone   ) 

Definition at line 691 of file mytest.cpp.

DefineTest ( atomicTypeOps   ) 

Definition at line 634 of file mytest.cpp.

DefineTest ( arrayOps   ) 

Definition at line 600 of file mytest.cpp.

DefineTest ( nameArray   ) 

Definition at line 577 of file mytest.cpp.

DefineTest ( removeElement   ) 

Definition at line 549 of file mytest.cpp.

DefineTest ( getTexture   ) 

Definition at line 533 of file mytest.cpp.

DefineTest ( sidResolve   ) 

Definition at line 433 of file mytest.cpp.

DefineTest ( extraTypeTest   ) 

Definition at line 374 of file mytest.cpp.

DefineTest ( rawSupport   ) 

Definition at line 349 of file mytest.cpp.

DefineTest ( roundTripSeymour   ) 

Definition at line 337 of file mytest.cpp.

DefineTest ( writeCamera   ) 

Definition at line 305 of file mytest.cpp.

DefineTest ( compareElements   ) 

Definition at line 275 of file mytest.cpp.

DefineTest ( renderStates   ) 

Definition at line 237 of file mytest.cpp.

DefineTest ( loadClipPlane   ) 

Definition at line 230 of file mytest.cpp.

DefineTest ( elementAddFunctions   ) 

Definition at line 185 of file mytest.cpp.

DefineTest ( utils   ) 

Definition at line 161 of file mytest.cpp.

DefineTest ( chopWS   ) 

Definition at line 149 of file mytest.cpp.

daeElement* findAncestorByType ( daeElement *  el,
daeString  type 
)

Definition at line 505 of file mytest.cpp.

daeElement* findChildByName ( daeElement *  el,
daeString  name 
)

Definition at line 493 of file mytest.cpp.

string getCharData ( daeElement *  el  ) 

Definition at line 519 of file mytest.cpp.

vector<string> getChildNames ( daeElement *  elt  ) 

Definition at line 850 of file mytest.cpp.

string getRoundTripFile ( const string &  name  ) 

Definition at line 326 of file mytest.cpp.

daeArray* getSkewArray ( daeElement *  node,
const string &  sid 
)

Definition at line 769 of file mytest.cpp.

daeURI* getTextureUri ( const string &  samplerSid,
daeElement &  effect 
)

Definition at line 523 of file mytest.cpp.

string getTmpFile ( const string &  fileName  ) 

Definition at line 135 of file mytest.cpp.

string lookupTestFile ( const string &  fileName  ) 

Definition at line 131 of file mytest.cpp.

int main ( int  argc,
char *  argv[] 
)

Definition at line 1609 of file mytest.cpp.

daeTArray<int> makeIntArray ( int  i,
  ... 
)

Definition at line 588 of file mytest.cpp.

void my_addEffect ( daeElement *  root  ) 

Definition at line 186 of file export.cpp.

void my_addGeometry ( daeElement *  root  ) 

Definition at line 90 of file export.cpp.

void my_addImage ( daeElement *  root  ) 

Definition at line 164 of file export.cpp.

void my_addMaterial ( daeElement *  root  ) 

Definition at line 209 of file export.cpp.

void my_addSource ( daeElement *  mesh,
const std::string &  srcID,
const std::string &  paramNames,
domFloat  values[],
int  valueCount 
)

Definition at line 40 of file export.cpp.

void my_addVisualScene ( daeElement *  root  ) 

Definition at line 219 of file export.cpp.

void nameArrayAppend ( domList_of_names &  names,
const char *  name 
)

Definition at line 572 of file mytest.cpp.

void nameArraySet ( domList_of_names &  names,
size_t  index,
const char *  name 
)

Definition at line 568 of file mytest.cpp.

void printMemoryToStringResult ( daeAtomicType &  type,
daeMemoryRef  value 
)

Definition at line 622 of file mytest.cpp.

bool printTestResults ( const map< string, testResult > &  failedTests  ) 

Definition at line 1566 of file mytest.cpp.

template<typename T >
daeTArray<T> rawArrayToDaeArray ( rawArray[],
size_t  count 
) [inline]

Definition at line 75 of file mytest.cpp.

map<string, domTest*>& registeredTests (  ) 

Definition at line 108 of file mytest.cpp.

daeElement* resolveID ( daeString  id,
daeDocument &  document 
)

Definition at line 511 of file mytest.cpp.

string resolveResultToString ( const string &  sidRef,
daeElement *  refElt 
)

Definition at line 425 of file mytest.cpp.

daeElement* resolveSid ( const string &  sid,
daeElement &  refElt 
)

Definition at line 515 of file mytest.cpp.

bool roundTrip ( const string &  file  ) 

Definition at line 330 of file mytest.cpp.

map<string, testResult> runTests ( const set< string > &  tests  ) 

Definition at line 1554 of file mytest.cpp.

fs::path& tmpPath (  ) 

Definition at line 118 of file mytest.cpp.

float toFloat ( const string &  s  ) 

Definition at line 86 of file mytest.cpp.

string toString ( daeAtomicType &  type,
daeMemoryRef  value 
)

Definition at line 628 of file mytest.cpp.

 All Classes Files Functions Variables Defines


wrapper_collada
Author(s): Miguel Oliveira
autogenerated on Wed Jul 23 04:34:51 2014