Jamoma API  0.6.0.a19
testNotWorkingYet.cpp
1 //
2 // test.cpp
3 // JamomaAudioGraphTest
4 //
5 // Created by Nathan Wolek on 11/20/13.
6 //
7 //
8 
9 #include <iostream>
10 #include "TTFoundationAPI.h"
11 #include "TTDSP.h"
12 #include "TTGraph.h"
13 #include "TTAudioGraph.h"
14 
15 int main(int argc, const char * argv[])
16 {
17  TTFoundationInit();
18 
19  std::cout << "BEGIN testing for AudioGraph...\n";
20  TTAudioGraphInit();
21 
22  TTValue classNames;
23 
24  // if the follow group tag is present within the thisTTClassTags definition, the class will be tested
25  TTValue testClassesWithTheseTags(TT("audioGraphLibrary"));
26  TTObject::GetRegisteredClassNamesForTags(classNames, testClassesWithTheseTags);
27 
28  for (int i=0; i<classNames.size(); i++) {
29  TTSymbol name = classNames[i];
30 
31  try {
32  TTObject obj(name);
33  std::cout << "TESTING " << name.string() << std::endl;
34  obj.send("test");
35  }
36  catch (...) {
37  TTLogMessage("UnitTest Failure to instantiate object of class %s! \n", name.c_str());
38  continue;
39  }
40  }
41 
42  // insert code here...
43  std::cout << "END testing of AudioGraph!\n";
44  return 0;
45 }
46 
Jamoma Asynchronous Object Graph Layer.
Create and use Jamoma object instances.
Definition: TTObject.h:29
size_type size() const noexcept
Return the number of elements.
static TTErr GetRegisteredClassNamesForTags(TTValue &classNames, const TTValue &searchTags)
Query TTEnvironment for names of all registered TTObjectBase classes that share specific tags...
Definition: TTObject.cpp:78
Registers classes for the primary AudioGraph library.
Jamoma DSP Library.
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
Definition: TTSymbol.h:155
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
const char * c_str() const
Return a pointer to the internal string as a C-string.
Definition: TTSymbol.h:77
void TTFOUNDATION_EXPORT TTLogMessage(TTImmutableCString message,...)
Platform and host independent method for posting log messages.
Definition: TTBase.cpp:534
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34