18 #include <libxml/encoding.h>
19 #include <libxml/xmlwriter.h>
20 #include <libxml/xmlreader.h>
22 #define thisTTClass TTApplicationManager
23 #define thisTTClassName "ApplicationManager"
24 #define thisTTClassTags "application, manager"
26 TT_MODULAR_CONSTRUCTOR,
27 mApplicationObserversMutex(NULL)
90 mApplicationObservers.setThreadProtection(
true);
91 mApplicationObserversMutex =
new TTMutex(
true);
97 mApplications.setThreadProtection(YES);
98 mProtocols.setThreadProtection(YES);
103 #pragma mark Destructor
106 TTApplicationManager::~TTApplicationManager()
108 delete mApplicationObserversMutex;
116 #pragma mark Application accesors
119 TTErr TTApplicationManager::getApplications(
TTValue& value)
121 value =
TTPtr(&mApplications);
125 TTErr TTApplicationManager::getApplicationNames(
TTValue& returnedApplicationNames)
127 return mApplications.
getKeys(returnedApplicationNames);
130 TTErr TTApplicationManager::getApplicationLocalName(
TTValue& returnedApplicationLocalName)
133 return mApplicationLocal.
get(kTTSym_name, returnedApplicationLocalName);
138 if (mApplicationLocal.
valid()) {
140 returnedApplicationLocal = mApplicationLocal;
149 #pragma mark Protocol accesors
152 TTErr TTApplicationManager::getProtocolNames(
TTValue& value)
154 return mProtocols.
getKeys(value);
159 #pragma mark Application factory
162 TTErr TTApplicationManager::ApplicationInstantiateLocal(
const TTValue& inputValue,
TTValue& outputValue)
169 if (mApplicationLocal.
valid())
172 if (inputValue.
size() == 1) {
176 applicationName = inputValue[0];
179 if (!mApplications.
lookup(applicationName, v)) {
181 TTLogError(
"%s application already exists\n", applicationName.
c_str());
186 anApplication =
TTObject(kTTSym_Application);
187 anApplication.
set(kTTSym_name, applicationName);
190 v =
TTValue(kTTAdrsRoot, anApplication);
191 anApplication.
send(
"ObjectRegister", v);
194 mApplications.
append(applicationName, anApplication);
197 mApplicationLocal = anApplication;
200 outputValue = anApplication;
214 TTErr TTApplicationManager::ApplicationInstantiateDistant(
const TTValue& inputValue,
TTValue& outputValue)
220 if (inputValue.
size() == 1) {
224 applicationName = inputValue[0];
227 if (!mApplications.
lookup(applicationName, v)) {
229 TTLogError(
"%s application already exists\n", applicationName.
c_str());
234 anApplication =
TTObject(kTTSym_Application);
235 anApplication.
set(kTTSym_name, applicationName);
236 anApplication.
set(kTTSym_type, kTTSym_mirror);
239 v =
TTValue(kTTAdrsRoot, anApplication);
240 anApplication.
send(
"ObjectRegister", v);
243 mApplications.
append(applicationName, anApplication);
246 outputValue = anApplication;
259 TTErr TTApplicationManager::ApplicationRelease(
const TTValue& inputValue,
TTValue& outputValue)
262 TTSymbol applicationName, protocolName;
266 if (inputValue.
size() == 1) {
270 applicationName = inputValue[0];
272 err = mApplications.
lookup(applicationName, v);
276 anApplication = v[0];
285 protocolName = protocols[i];
286 mProtocols.
lookup(protocolName, v);
289 aProtocol.
send(
"ApplicationUnregister", applicationName);
293 anApplication.
send(
"ObjectUnregister", kTTAdrsRoot);
300 mApplications.
remove(applicationName);
314 TTErr TTApplicationManager::ApplicationRename(
const TTValue& inputValue,
TTValue& outputValue)
316 if (inputValue.
size() == 2) {
321 TTSymbol oldApplicationName = inputValue[0];
322 TTSymbol newApplicationName = inputValue[1];
325 if (!mApplications.
lookup(newApplicationName, v)) {
327 TTLogError(
"%s application already exists\n", newApplicationName.
c_str());
331 if (!mApplications.
lookup(oldApplicationName, v)) {
338 mApplications.
remove(oldApplicationName);
339 mApplications.
append(newApplicationName, anApplication);
343 mProtocols.
getKeys(protocolNames);
346 TTSymbol protocolName = protocolNames[i];
348 if (!mProtocols.
lookup(protocolName, v)) {
350 aProtocol.
send(
"ApplicationRename", inputValue, outputValue);
365 TTErr TTApplicationManager::ApplicationFind(
const TTValue& inputValue,
TTValue& outputValue)
367 if (inputValue.
size()) {
371 TTSymbol applicationName = inputValue[0];
373 return mApplications.
lookup(applicationName, outputValue);
387 bool foundObsv =
false;
390 if (!mApplicationObservers.
isEmpty()) {
393 mApplicationObserversMutex->lock();
395 this->mApplicationObservers.
getKeys(hk);
398 for (i = 0; i < hk.
size(); i++) {
403 if (key == anApplicationName){
406 mApplicationObservers.
lookup(key, lk);
407 lk_o = TTListPtr((
TTPtr)lk[0]);
409 if (!lk_o->isEmpty()) {
410 for (lk_o->begin(); lk_o->end(); lk_o->next())
414 anObserver = lk_o->current()[0];
416 data.
append(anApplicationName);
417 data.
append(anApplication);
421 anObserver.
send(
"notify", data, dummy);
430 mApplicationObserversMutex->unlock();
443 #pragma mark Protocol factory
446 TTErr TTApplicationManager::ProtocolInstantiate(
const TTValue& inputValue,
TTValue& outputValue)
449 TTObject aProtocol, activityInCallback, activityOutCallback;
452 if (inputValue.
size() == 1) {
456 protocolName = inputValue[0];
459 if (!mProtocols.
lookup(protocolName, v)) {
469 activityInCallback =
TTObject(
"callback");
470 activityInCallback.
set(kTTSym_baton, protocolName);
472 args.
append(activityInCallback);
474 activityOutCallback =
TTObject(
"callback");
475 activityOutCallback.
set(kTTSym_baton, protocolName);
477 args.
append(activityOutCallback);
480 aProtocol =
TTObject(protocolName, args);
482 if (aProtocol.
valid()) {
486 mProtocols.
append(protocolName, args);
489 outputValue = aProtocol;
503 TTErr TTApplicationManager::ProtocolRelease(
const TTValue& inputValue,
TTValue& outputValue)
508 if (inputValue.
size()) {
512 protocolName = inputValue[0];
514 if (!mProtocols.
lookup(protocolName, v)) {
517 aProtocol.
send(
"Stop");
519 mProtocols.
remove(protocolName);
535 if (inputValue.
size()) {
539 TTSymbol protocolName = inputValue[0];
541 return mProtocols.
lookup(protocolName, outputValue);
550 #pragma mark Application features
553 TTErr TTApplicationManager::ApplicationDiscover(
const TTValue& inputValue,
TTValue& outputValue)
561 whereToDiscover = inputValue[0];
567 TTList nodeList, childList;
578 err = directory->
Lookup(whereToDiscover, nodeList, &firstNode);
583 firstNode->
getChildren(S_WILDCARD, S_WILDCARD, childList);
585 *returnedType = kTTSym_none;
589 if (anObject.
valid()) {
592 objectType = anObject.
name();
594 if (objectType != kTTSymEmpty)
595 *returnedType = objectType;
602 childList.sort(&compareNodePriorityThenNameThenInstance);
605 for (childList.begin(); childList.end(); childList.next()) {
611 aNode->
getAddress(nodeAddress, whereToDiscover);
612 returnedChildren->
append(nodeAddress);
621 TTErr TTApplicationManager::ApplicationDiscoverAll(
const TTValue& inputValue,
TTValue& outputValue)
626 whereToDiscover = inputValue[0];
635 err = directory->
getTTNode(whereToDiscover, &aNode);
639 outputValue =
TTPtr(aNode);
644 TTErr TTApplicationManager::ApplicationGet(
const TTValue& inputValue,
TTValue& outputValue)
649 whereToGet = inputValue[0];
660 err = directory->
getTTNode(whereToGet, &nodeToGet);
665 if (anObject.
valid())
672 TTErr TTApplicationManager::ApplicationSet(
const TTValue& inputValue,
TTValue& outputValue)
678 whereToSet = inputValue[0];
693 err = directory->
Lookup(whereToSet, aNodeList, &nodeToSet);
698 for (aNodeList.begin(); aNodeList.end(); aNodeList.next())
705 if (anObject.valid()) {
707 objectType = anObject.name();
710 if (objectType == kTTSym_Data) {
713 err = anObject.send(kTTSym_Command, *newValue);
715 err = anObject.set(whereToSet.
getAttribute(), *newValue);
719 err = anObject.set(whereToSet.
getAttribute(), *newValue);
723 err = anObject.send(whereToSet.
getAttribute(), *newValue);
737 TTErr TTApplicationManager::ApplicationListen(
const TTValue& inputValue,
TTValue& outputValue)
746 protocolName = inputValue[0];
747 appToNotify = inputValue[1];
748 whereToListen = inputValue[2];
749 enableListening = inputValue[3];
753 if (applicationToListen.
valid()) {
755 if (!mProtocols.
lookup(protocolName, v)) {
762 if (enableListening) {
766 args.
append(whereToListen);
770 return applicationToListen.
send(
"AddDirectoryListener", args);
774 return applicationToListen.
send(
"AddAttributeListener", args);
780 args.
append(whereToListen);
784 return applicationToListen.
send(
"RemoveDirectoryListener", args);
788 return applicationToListen.
send(
"RemoveAttributeListener", args);
796 TTErr TTApplicationManager::ApplicationListenAnswer(
const TTValue& inputValue,
TTValue& outputValue)
804 appAnswering = inputValue[0];
805 whereComesFrom = inputValue[1];
808 if (!mApplications.
lookup(appAnswering, v)) {
810 TTLogDebug(
"TTApplicationManager::ListenAnswer");
812 anApplication = v[0];
814 args.
append(whereComesFrom);
819 return anApplication.
send(
"UpdateDirectory", args);
823 return anApplication.
send(
"UpdateAttribute", args);
831 #pragma mark Protocol features
842 if (inputValue.
size()) {
844 protocolName = inputValue[0];
846 if (!mProtocols.
lookup(protocolName, v)) {
848 aProtocol.
send(
"Scan");
853 mProtocols.
getKeys(allProtocolNames);
854 for (
TTUInt16 i = 0; i < allProtocolNames.
size(); i++) {
856 protocolName = allProtocolNames[i];
857 err = mProtocols.
lookup(protocolName, v);
861 aProtocol.
send(
"Scan");
871 TTValue v, protocolNames, applicationNames;
872 TTSymbol protocolName, applicationName;
879 if (inputValue.
size()) {
881 protocolName = inputValue[0];
883 if (!mProtocols.
lookup(protocolName, v)) {
885 start = aProtocol.
send(kTTSym_Run);
891 mProtocols.
getKeys(protocolNames);
894 protocolName = protocolNames[i];
895 this->ProtocolRun(protocolName, dummy);
905 mApplications.
getKeys(applicationNames);
906 for (
TTUInt16 j = 0; j < applicationNames.
size(); j++) {
909 applicationName = applicationNames[j];
910 mApplications.
lookup(applicationName, v);
911 anApplication = v[0];
916 aProtocol.
send(
"isRegistered", applicationName, v);
931 TTValue v, protocolNames, applicationNames;
932 TTSymbol protocolName, applicationName;
939 if (inputValue.
size()) {
941 protocolName = inputValue[0];
943 if (!mProtocols.
lookup(protocolName, v)) {
945 stop = aProtocol.
send(kTTSym_Stop);
951 mProtocols.
getKeys(protocolNames);
955 protocolName = protocolNames[i];
956 this->ProtocolStop(protocolName, dummy);
966 mApplications.
getKeys(applicationNames);
967 for (
TTUInt16 j = 0; j < applicationNames.
size(); j++) {
970 applicationName = applicationNames[j];
971 mApplications.
lookup(applicationName, v);
972 anApplication = v[0];
977 aProtocol.
send(
"isRegistered", applicationName, v);
1009 xmlTextWriterWriteComment((xmlTextWriterPtr)aXmlHandler->mWriter, BAD_CAST
"protocols setup");
1012 for (i = 0; i < keys.
size(); i++) {
1015 mProtocols.
lookup(name, v);
1018 writeProtocolAsXml(aXmlHandler, aProtocol);
1022 xmlTextWriterWriteComment((xmlTextWriterPtr)aXmlHandler->mWriter, BAD_CAST
"applications namespace");
1025 for (i = 0; i < keys.
size(); i++) {
1028 mApplications.
lookup(name, v);
1029 anApplication = v[0];
1043 TTValue v, none, applicationNames, parametersNames;
1048 xmlTextWriterStartElement((xmlTextWriterPtr)aXmlHandler->mWriter, BAD_CAST
"protocol");
1051 xmlTextWriterWriteAttribute((xmlTextWriterPtr)aXmlHandler->mWriter, BAD_CAST
"name", BAD_CAST aProtocol.
name().
c_str());
1054 mApplications.
getKeys(applicationNames);
1056 for (TTElementIter it1 = applicationNames.begin() ; it1 != applicationNames.end() ; it1++)
1060 aProtocol.
send(
"isRegistered", name, v);
1068 err = aProtocol.
send(
"ApplicationSelect", name);
1071 xmlTextWriterStartElement((xmlTextWriterPtr)aXmlHandler->mWriter, BAD_CAST name.
c_str());
1074 aProtocol.
get(
"parameterNames", parametersNames);
1075 for (TTElementIter it2 = parametersNames.begin() ; it2 != parametersNames.end() ; it2++)
1080 aProtocol.
get(name, v);
1084 xmlTextWriterWriteAttribute((xmlTextWriterPtr)aXmlHandler->mWriter, BAD_CAST name.
c_str(), BAD_CAST s.data());
1088 xmlTextWriterEndElement((xmlTextWriterPtr)aXmlHandler->mWriter);
1093 xmlTextWriterEndElement((xmlTextWriterPtr)aXmlHandler->mWriter);
1105 TTSymbol applicationName, applicationType, currentApplicationName;
1106 TTSymbol protocolName, currentProtocolName, parameterName, parameterType;
1107 TTValue v, args, applicationNames, protocolNames, parameterValue, out, none;
1114 if (aXmlHandler->
mXmlNodeName == kTTSym_xmlHandlerReadingStarts) {
1117 ProtocolStop(v, out);
1120 mProtocols.
getKeys(protocolNames);
1121 for (i = 0; i < protocolNames.
size(); i++) {
1123 protocolName = protocolNames[i];
1124 mProtocols.
lookup(protocolName, v);
1125 mCurrentProtocol = v[0];
1127 mApplications.
getKeys(applicationNames);
1128 for (j = 0; j < applicationNames.
size(); j++)
1129 mCurrentProtocol.
send(
"ApplicationUnregister", applicationNames[j]);
1134 mApplications.
getKeys(applicationNames);
1135 for (i = 0; i < applicationNames.
size(); i++) {
1137 applicationName = applicationNames[i];
1138 mApplications.
lookup(applicationName, v);
1139 mApplicationCurrent = v[0];
1142 mApplications.
remove(applicationName);
1152 if (aXmlHandler->
mXmlNodeName == kTTSym_xmlHandlerReadingEnds) {
1155 ProtocolRun(v, out);
1168 xmlTextReaderMoveToAttribute((xmlTextReaderPtr)aXmlHandler->mReader, (
const xmlChar*)(
"name"));
1169 aXmlHandler->
fromXmlChar(xmlTextReaderValue((xmlTextReaderPtr)aXmlHandler->mReader), v);
1173 protocolName = v[0];
1178 mCurrentProtocol.
get(kTTSym_name, v);
1179 currentProtocolName = v[0];
1181 if (protocolName == currentProtocolName) {
1189 mCurrentProtocol = v[0];
1194 if (mCurrentProtocol.
valid()) {
1199 err = mCurrentProtocol.
send(
"ApplicationRegister", aXmlHandler->
mXmlNodeName);
1207 while (xmlTextReaderMoveToNextAttribute((xmlTextReaderPtr)aXmlHandler->mReader) == 1) {
1210 aXmlHandler->
fromXmlChar(xmlTextReaderName((xmlTextReaderPtr)aXmlHandler->mReader), v);
1212 if (v.
size() == 1) {
1216 parameterName = v[0];
1218 parameterType = mCurrentProtocol.
attributeType(parameterName);
1221 aXmlHandler->
fromXmlChar(xmlTextReaderValue((xmlTextReaderPtr)aXmlHandler->mReader), parameterValue, parameterType == kTTSym_symbol);
1224 mCurrentProtocol.
set(parameterName, parameterValue);
1237 xmlTextReaderMoveToAttribute((xmlTextReaderPtr)aXmlHandler->mReader, (
const xmlChar*)(
"name"));
1238 aXmlHandler->
fromXmlChar(xmlTextReaderValue((xmlTextReaderPtr)aXmlHandler->mReader), v);
1242 applicationName = v[0];
1246 mApplicationCurrent.
get(kTTSym_name, v);
1247 currentApplicationName = v[0];
1249 if (applicationName == currentApplicationName) {
1250 mApplicationCurrent = NULL;
1256 if (!mApplications.
lookup(applicationName, v))
1257 mApplicationCurrent = v[0];
1263 xmlTextReaderMoveToAttribute((xmlTextReaderPtr)aXmlHandler->mReader, (
const xmlChar*)(
"type"));
1264 aXmlHandler->
fromXmlChar(xmlTextReaderValue((xmlTextReaderPtr)aXmlHandler->mReader), v);
1268 applicationType = v[0];
1270 if (applicationType == kTTSym_local)
1271 ApplicationInstantiateLocal(applicationName, v);
1273 ApplicationInstantiateDistant(applicationName, v);
1275 mApplicationCurrent = v[0];
1283 if (mApplicationCurrent.
valid()) {
1286 v =
TTValue(mApplicationCurrent);
1296 #pragma mark Public methods useful to ease access for other Modular classes
1303 if (!mApplications.
lookup(applicationName, v)) {
1333 if (applicationName == NO_DIRECTORY)
1366 err = mProtocols.
lookup(name, v);
1371 anObject.
send(
"isRegistered", applicationName, v);
1386 if (!mProtocols.
lookup(protocolName, v)) {
1393 TTLogError(
"TTApplicationManager::findProtocol : wrong protocol name\n");
1400 #pragma mark Some Functions
1418 lk_o =
new TTList();
1419 lk_o->appendUnique(o);
1425 lk_o = TTListPtr((
TTPtr)lk[0]);
1426 lk_o->appendUnique(o);
1449 lk_o = TTListPtr((
TTPtr)lk[0]);
1453 err = lk_o->findEquals(o, v);
1458 if(lk_o->getSize() == 0) {
1476 aProtocolName = baton[0];
1492 aProtocolName = baton[0];
TTErr sendMessage(const TTSymbol name)
TODO: Document this function.
TTApplicationPtr findApplicationFrom(TTAddress anAddress)
Get an application relative to an address.
an application have been released by the application manager
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
#define accessApplicationDirectoryFrom(anAddress)
Access to an application directory using an address.
std::uint16_t TTUInt16
16 bit unsigned integer
TTErr send(const TTSymbol aName)
Send a message to this object with no arguments.
TTApplicationNotificationFlag
TTString toString(TTBoolean quotes=YES) const
Return the content as a single string with spaces between elements.
TTErr lookup(const TTSymbol key, TTValue &value)
Find the value for the given key.
TTErr fromXmlChar(const void *xCh, TTValue &v, TTBoolean addQuote=NO, TTBoolean numberAsSymbol=NO)
TTXmlReader make a TTValue from an xmlChar* using the fromString method (see in TTValue.h)
TTSymbol & getDirectory()
Get the directory part.
#define addAttribute(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom getter...
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
application's protocol will be stopped
TTNodeDirectoryPtr getDirectory()
Get directory object.
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Create and use Jamoma object instances.
TTProtocol is the base class for all protocol protocol.
TTObject & getObject()
Get the object binded by this node.
size_type size() const noexcept
Return the number of elements.
TTErr getKeys(TTValue &hashKeys)
Get an array of all of the keys for the hash table.
TTBoolean mXmlNodeIsEmpty
true if the Node is empty
TTErr setAttributeValue(const TTSymbol name, TTValue &value)
Set an attribute value for an object.
TTErr Lookup(TTAddress anAddress, TTList &returnedTTNodes, TTNodePtr *firstReturnedTTNode)
Find TTNodes by address.
This is a special type used by TTAttribute to indicate that a value is a TTValue and is locally maint...
void prepend(const TTValue &aValueToPrepend)
Insert another TTValue before the first element.
void append(const T &anElementValueToAppend)
Insert a single TTElement at the end.
#define addAttributeWithGetter(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom getter...
void * TTPtr
A generic pointer.
TTErr TTApplicationManagerAddApplicationObserver(TTSymbol anApplicationName, const TTObject anObserver)
Add a TTCallback as observer of application creation/destruction note : it uses the extern TTModularA...
TTErr get(const TTSymbol aName, T &aReturnedValue) const
Get an attribute value for an object.
TTMODULAR_EXPORT TTApplicationManagerPtr TTModularApplicationManager
Export a pointer to a TTApplicationManager instance.
friend TTErr TTMODULAR_EXPORT TTApplicationManagerProtocolActivityInCallback(const TTValue &baton, const TTValue &data)
To get back raw incoming messages from any protocol.
application's protocol have been started
TTValue getApplicationProtocolNames(TTSymbol applicationName)
Get application protocol names relative to a name.
TTSymbol name() const
Return the name of this class.
#define addAttributeProperty(attributeName, propertyName, initialValue)
A convenience macro to be used for registering properties of attributes.
TTErr set(const TTSymbol aName, T aValue)
Set an attribute value for an object.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTErr append(const TTSymbol key, const TTValue &value)
Insert an item into the hash table.
TTBoolean mXmlNodeStart
true if the Reader starts to read a Node
void TTFOUNDATION_EXPORT TTLogError(TTImmutableCString message,...)
Platform and host independent method for posting errors.
TTApplicationPtr findApplication(TTSymbol applicationName)
Get an application relative to a name.
TTSymbol attributeType(const TTSymbol aName)
Return the type of an attribute as a symbol.
TTBoolean isEmpty()
Return true if the hash has nothing stored in it.
Handles application data structure like a TTNodeDirectory and a hash tables of names.
TTSymbol & getAttribute()
Get the attribute part.
A value was not found when doing a look up for it (in a TTHash, TTList, or other class).
#define addMessageWithArguments(name)
A convenience macro to be used by subclasses for registering messages.
Individual items found in a TTValue.
const char * c_str() const
Return a pointer to the internal string as a C-string.
an application have been intantiated by the application manager
TTErr getAddress(TTAddress &returnedAddress, TTAddress from=kTTAdrsEmpty)
Get the address of the node.
void TTFOUNDATION_EXPORT TTLogMessage(TTImmutableCString message,...)
Platform and host independent method for posting log messages.
Something went wrong, but what exactly is not known. Typically used for context-specific problems...
TTApplicationPtr getApplicationLocal()
Get local application.
TTErr remove(const TTSymbol key)
Remove an item from the hash table.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
signed char TTInt8
8 bit signed integer (char)
void attributes(TTValue &returnedAttributeNames) const
Return a list of names of the available attributes.
TTSymbol mXmlNodeName
the Node name being read by the Reader
void TTFOUNDATION_EXPORT TTLogDebug(TTImmutableCString message,...)
Platform and host independent method for posting messages only when debugging is enabled in the envir...
Handles TTApplication and #Protocol instances.
TTErr getChildren(TTSymbol &name, TTSymbol &instance, TTList &returnedChildren)
Get a linklist of children of the node : select them by name and instance (use wilcards to select the...
TTObjectBase * instance() const
Return a direct pointer to the internal instance.
The TTString class is used to represent a string.
TTNodeDirectoryPtr findApplicationDirectory(TTSymbol applicationName)
Get an application directory relative to a name.
TTNodeDirectoryPtr findApplicationDirectoryFrom(TTAddress anAddress)
Get an application directory relative to an address.
TTErr TTApplicationManagerProtocolActivityOutCallback(const TTValue &baton, const TTValue &data)
To get back raw outputing messages from any protocol.
TTBoolean valid() const
Determine if the object contained by this TTObject is truly ready for use.
friend TTErr TTMODULAR_EXPORT TTApplicationManagerProtocolActivityOutCallback(const TTValue &baton, const TTValue &data)
To get back raw outputing messages from any protocol.
TTErr(TTObjectBase::* TTGetterMethod)(const TTAttribute &attribute, TTValue &value)
A type that can be used to store a pointer to a message for an object.
We build a tree of TTNodes, and you can request a pointer for any TTNode, or add an observer to any T...
[doxygenAppendixC_copyExample]
TTErr TTApplicationManagerRemoveApplicationObserver(TTSymbol anApplicationName, const TTObject anObserver)
Remove a TTCallback as observer of application creation/destruction note : it uses the extern TTModul...
TTErr TTApplicationManagerProtocolActivityInCallback(const TTValue &baton, const TTValue &data)
To get back raw incoming messages from any protocol.
TTErr getTTNode(const char *anAddress, TTNodePtr *returnedTTNode)
Given an address, return a pointer to a TTNode.
TTProtocolPtr findProtocol(TTSymbol protocolName)
Get a protocol relative to a name.
unsigned char TTUInt8
8 bit unsigned integer (char)
#define addMessageProperty(messageName, propertyName, initialValue)
A convenience macro to be used for registering properties of messages.