CicmWrapper  Beta 0.4
A wrapper for Pure Data
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
ecommon.h
1 /*
2  * CicmWrapper - Pure Data Enhanced
3  *
4  * A wrapper for Pure Data
5  *
6  * Copyright (C) 2013 Pierre Guillot, CICM - Université Paris 8
7  * All rights reserved.
8  *
9  * Website : http://www.mshparisnord.fr/HoaLibrary/
10  * Contacts : cicm.mshparisnord@gmail.com
11  *
12  * This library is free software; you can redistribute it and/or modify it
13  * under the terms of the GNU Library General Public License as published
14  * by the Free Software Foundation; either version 2 of the License.
15  *
16  * This library is distributed in the hope that it will be useful, but WITHOUT
17  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
19  * License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public License
22  * along with this library; if not, write to the Free Software Foundation,
23  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24  *
25  */
26 
33 #ifndef DEF_EPD_COMMON
34 #define DEF_EPD_COMMON
35 
36 #include "edefine.h"
37 
38 void object_method(void* x, t_symbol* s, void* z, t_typ_method method, long number, void* other);
39 
44 void epd_init(void);
47 
56 int atoms_get_attributes_offset(int argc, t_atom* argv);
57 
65 int binbuf_get_attributes_offset(t_binbuf *d);
66 
75 int atoms_get_nattributes(int argc, t_atom* argv);
76 
84 int binbuf_get_nattributes(t_binbuf *d);
85 
95 t_pd_err atoms_has_attribute(int argc, t_atom* argv, t_symbol *key);
96 
105 t_pd_err binbuf_has_attribute(t_binbuf *d, t_symbol *key);
106 
116 int atoms_get_attribute_index(int argc, t_atom *argv, t_symbol *key);
117 
126 int binbuf_get_attribute_index(t_binbuf *d, t_symbol *key);
127 
139 t_pd_err atoms_get_attribute(int ac, t_atom* av, t_symbol *key, int *argc, t_atom **argv);
140 
151 t_pd_err binbuf_get_attribute(t_binbuf *d, t_symbol *key, int *argc, t_atom **argv);
152 
163 t_pd_err atoms_get_attribute_long(int ac, t_atom* av, t_symbol *key, long *value);
164 
174 t_pd_err binbuf_get_attribute_long(t_binbuf *d, t_symbol *key, long *value);
175 
186 t_pd_err atoms_get_attribute_float(int ac, t_atom* av, t_symbol *key, float *value);
187 
197 t_pd_err binbuf_get_attribute_float(t_binbuf *d, t_symbol *key, float *value);
198 
208 int atoms_get_keys(int ac, t_atom* av, t_symbol*** keys);
209 
218 int binbuf_get_keys(t_binbuf *d, t_symbol*** keys);
219 
228 t_binbuf* binbuf_via_atoms(int ac, t_atom *av);
229 
240 t_pd_err binbuf_append_attribute(t_binbuf *d, t_symbol *key, int argc, t_atom *argv);
241 
249 void epd_add_folder(const char* name, const char* folder);
250 
252 #endif
int atoms_get_keys(int ac, t_atom *av, t_symbol ***keys)
Retrieves the keys of attributes presents in an array of t_atom.
Definition: ecommon.c:316
int binbuf_get_nattributes(t_binbuf *d)
Retrieves the number of attributes in a t_binbuf.
Definition: ecommon.c:311
t_pd_err binbuf_get_attribute_float(t_binbuf *d, t_symbol *key, float *value)
Retrieves the float value of an attribute from a t_binbuf.
Definition: ecommon.c:515
void epd_add_folder(const char *name, const char *folder)
Adds a subfolder to library folder.
Definition: ecommon.c:523
t_pd_err atoms_get_attribute_float(int ac, t_atom *av, t_symbol *key, float *value)
Retrieves the float value of an attribute from an array of t_atom.
Definition: ecommon.c:494
int binbuf_get_keys(t_binbuf *d, t_symbol ***keys)
Retrieves the keys of attributes presents in a t_binbuf.
Definition: ecommon.c:339
t_pd_err atoms_get_attribute_long(int ac, t_atom *av, t_symbol *key, long *value)
Retrieves the long value of an attribute from an array of t_atom.
Definition: ecommon.c:465
t_pd_err binbuf_get_attribute(t_binbuf *d, t_symbol *key, int *argc, t_atom **argv)
Retrieves the values of an attribute from a t_binbuf.
Definition: ecommon.c:457
long t_pd_err
The error type.
Definition: edefine.h:84
t_binbuf * binbuf_via_atoms(int ac, t_atom *av)
Retrieves a t_binbuf from an array of t_atom.
Definition: ecommon.c:142
int atoms_get_attribute_index(int argc, t_atom *argv, t_symbol *key)
Retrieves the position of an attribute in an array of t_atom.
Definition: ecommon.c:369
int atoms_get_attributes_offset(int argc, t_atom *argv)
Retrieves the position of the first attribute in an array of t_atom.
Definition: ecommon.c:280
int binbuf_get_attribute_index(t_binbuf *d, t_symbol *key)
Retrieves the position of an attribute in a t_binbuf.
Definition: ecommon.c:386
int atoms_get_nattributes(int argc, t_atom *argv)
Retrieves the number of attributes in an array of t_atom.
Definition: ecommon.c:298
t_pd_err binbuf_append_attribute(t_binbuf *d, t_symbol *key, int argc, t_atom *argv)
Adds the key and the values of an attribute to a t_binbuf.
Definition: ecommon.c:268
int binbuf_get_attributes_offset(t_binbuf *d)
Retrieves the position of the first attribute in a t_binbuf.
Definition: ecommon.c:293
t_pd_err atoms_has_attribute(int argc, t_atom *argv, t_symbol *key)
Retrieves if an attributes is in an array of t_atom.
Definition: ecommon.c:345
t_pd_err atoms_get_attribute(int ac, t_atom *av, t_symbol *key, int *argc, t_atom **argv)
Retrieves the values of an attribute from an array of t_atom.
Definition: ecommon.c:391
t_pd_err binbuf_has_attribute(t_binbuf *d, t_symbol *key)
Retrieves if an attributes is in a t_binbuf.
Definition: ecommon.c:361
void(* t_typ_method)(void *x,...)
The standart method.
Definition: edefine.h:86
t_pd_err binbuf_get_attribute_long(t_binbuf *d, t_symbol *key, long *value)
Retrieves the long value of an attribute from a t_binbuf.
Definition: ecommon.c:486