Jamoma API  0.6.0.a19
TTModular.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup modularLibrary
4  *
5  * @brief the Modular Application Programming Interface
6  *
7  * @details The Modular API allows to use Modular inside any application @n@n
8  *
9  * @see TTModularIncludes
10  *
11  * @authors Théo de la Hogue
12  *
13  * @copyright Copyright © 2013, Théo de la Hogue @n
14  * This code is licensed under the terms of the "New BSD License" @n
15  * http://creativecommons.org/licenses/BSD/
16  */
17 
18 #ifndef __TT_MODULAR_H__
19 #define __TT_MODULAR_H__
20 
21 #include "TTModularIncludes.h"
22 
25 
26 #if 0
27 #pragma mark -
28 #pragma mark Initialisation
29 #endif
30 
31 /** Initialize the Modular library and intanciate the TTModular object
32  @param binaries path to the Jamoma libraries and extensions binaries folder to load them */
33 void TTMODULAR_EXPORT TTModularInit(const char* binaries = nullptr, bool loadFromBuiltinPaths = false);
34 
35 #if 0
36 #pragma mark -
37 #pragma mark Application management
38 #endif
39 
40 /** Export a pointer to a #TTApplicationManager instance
41  @details this pointer is automatically filled when a #TTApplicationManager is instanciated */
43 
44 #if 0
45 #pragma mark -
46 #pragma mark Selection management
47 #endif
48 
49 extern TTMODULAR_EXPORT TTHashPtr TTModularSelections;
50 
51 /** Get a selection or create one if it doesn't exist yet
52  @param selectionName a symbol */
53 TTAddressItemPtr TTMODULAR_EXPORT TTModularSelectionLookup(const TTSymbol selectionName);
54 
55 #if 0
56 #pragma mark -
57 #pragma mark Addresses edition
58 #endif
59 
60 /** Edit a specific integer instance address using an integer format address
61  @param integerFormatAddress a symbol as integer format address : /any/level/name.%d
62  @param instanceNumber an unsigned integer
63  @return #TTAddress like /any/level/name.1 */
64 TTAddress TTMODULAR_EXPORT TTModularAddressEditNumericInstance(const TTSymbol integerFormatAddress,
65  const TTUInt32 instanceNumber);
66 
67 /** Edit a specific symbol instance address using an symbol format address
68  @param symbolFormatAddress a symbol as symbol format address : /any/level/name.%s
69  @param instanceSymbol a symbol
70  @return #TTAddress like /any/level/name.foo */
71 TTAddress TTMODULAR_EXPORT TTModularAddressEditSymbolInstance(const TTSymbol symbolFormatAddress,
72  const TTSymbol instanceSymbol);
73 
74 /** Get all intances at an address
75  @param address an address without instance part :
76  - /any/level/name
77  - distantApp:/any/level/name
78  @param instances the returned instances symbols
79  @return #kTTErrGeneric if the address doesn't exist */
80 TTErr TTMODULAR_EXPORT TTModularAddressGetInstances(const TTAddress address,
81  TTValue& instances);
82 
83 #endif // __TT_MODULAR_H__
TTModular Library.
TTErr TTMODULAR_EXPORT TTModularAddressGetInstances(const TTAddress address, TTValue &instances)
Get all intances at an address.
Definition: TTModular.cpp:148
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
TTAddressItemPtr TTMODULAR_EXPORT TTModularSelectionLookup(const TTSymbol selectionName)
Get a selection or create one if it doesn't exist yet.
Definition: TTModular.cpp:110
TTAddress TTMODULAR_EXPORT TTModularAddressEditNumericInstance(const TTSymbol integerFormatAddress, const TTUInt32 instanceNumber)
Edit a specific integer instance address using an integer format address.
Definition: TTModular.cpp:138
Maintain a collection of TTValue objects indexed by TTSymbol pointers.
Definition: TTHash.h:36
TTMODULAR_EXPORT TTApplicationManagerPtr TTModularApplicationManager
Export a pointer to a TTApplicationManager instance.
Definition: TTModular.cpp:34
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
Handles TTApplication and #Protocol instances.
TTAddress TTMODULAR_EXPORT TTModularAddressEditSymbolInstance(const TTSymbol symbolFormatAddress, const TTSymbol instanceSymbol)
Edit a specific symbol instance address using an symbol format address.
Definition: TTModular.cpp:143
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
std::uint32_t TTUInt32
32 bit unsigned integer
Definition: TTBase.h:178
void TTMODULAR_EXPORT TTModularInit(const char *binaries=nullptr, bool loadFromBuiltinPaths=false)
Initialize the Modular library and intanciate the TTModular object.
Definition: TTModular.cpp:45
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34