Jamoma API  0.6.0.a19
TTSender.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup modularLibrary
4  *
5  * @brief A Sender Object
6  *
7  * @details
8  *
9  * @authors Théo de la Hogue
10  *
11  * @copyright © 2010, Théo de la Hogue @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 
17 #ifndef __TT_SENDER_H__
18 #define __TT_SENDER_H__
19 
20 #include "TTModularIncludes.h"
21 
22 /** TTSender ... TODO : an explanation
23  control a TTData
24 
25  */
26 
27 class TTMODULAR_EXPORT TTSender : public TTObjectBase
28 {
30 
31 public: // use public for quick acces during signal processing
32 
33  TTObject mSignal; ///< any data structure to send complex signal
34 
35 private:
36 
37  TTAddress mAddress; ///< ATTRIBUTE: the address to bind
38  TTBoolean mIsSending; ///< a flag to lock the object in case of infinite loop
39  // TODO JamomaCore #305 : TTList : allow to register as none pointer members
40  TTListPtr mObjectCache; ///< ATTRIBUTE : a cache containing all binded objects for quick access
41  TTObject mAddressObserver; ///< an address life cycle observer
42  TTObject mApplicationObserver; ///< an application life cycle observer
43 
44  /** Setter for mAddress attribute. */
45  TTErr setAddress(const TTValue& value);
46 
47  /** Getter for mObjectCache attribute. */
48  TTErr getObjectCache(TTValue& value);
49 
50  /** */
51  TTErr Send(TTValue& valueToSend, TTValue& outputValue); // to -- lower case in order to hide the message during the Class wrapping process
52 
53  /** */
54  TTErr bindAddress(TTNodeDirectoryPtr aDirectory);
55 
56  /** */
57  TTErr unbindAddress(TTNodeDirectoryPtr aDirectory);
58 
59  /** */
60  TTErr bindApplication();
61 
62  /** */
63  TTErr unbindApplication();
64 
65  friend TTErr TTMODULAR_EXPORT TTSenderDirectoryCallback(const TTValue& baton, const TTValue& data);
66  friend TTErr TTMODULAR_EXPORT TTSenderApplicationManagerCallback(const TTValue& baton, const TTValue& data);
67 
68 };
69 
70 typedef TTSender* TTSenderPtr;
71 
72 /**
73  @param baton ..
74  @param data ..
75  @return an error code */
76 TTErr TTMODULAR_EXPORT TTSenderDirectoryCallback(const TTValue& baton, const TTValue& data);
77 
78 /**
79  @param baton ..
80  @param data ..
81  @return an error code */
82 TTErr TTMODULAR_EXPORT TTSenderApplicationManagerCallback(const TTValue& baton, const TTValue& data);
83 
84 #endif // __TT_SENDER_H__
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
Definition: TTBase.h:167
TTModular Library.
TTObject mSignal
any data structure to send complex signal
Definition: TTSender.h:33
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
Create and use Jamoma object instances.
Definition: TTObject.h:29
Base class for all first-class Jamoma objects.
Definition: TTObjectBase.h:109
TTErr TTMODULAR_EXPORT TTSenderDirectoryCallback(const TTValue &baton, const TTValue &data)
Definition: TTSender.cpp:240
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTErr TTMODULAR_EXPORT TTSenderApplicationManagerCallback(const TTValue &baton, const TTValue &data)
Definition: TTSender.cpp:294
TTSender ...
Definition: TTSender.h:27
We build a tree of TTNodes, and you can request a pointer for any TTNode, or add an observer to any T...
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34