00001 /* 00002 * WOscLib, an object oriented OSC library. 00003 * Copyright (C) 2005 Uli Clemens Franke, Weiss Engineering LTD, Switzerland. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 * 00019 * For details see lgpl.txt 00020 * 00021 * Weiss Engineering LTD. 00022 * Florastrass 42 00023 * 8610 Uster 00024 * Switzerland 00025 * 00026 * uli.franke@weiss.ch 00027 */ 00028 00029 /** WOscLib library main header file. 00030 * Main preprocessor defines, globals (if any) and doxygen main-page. 00031 * 00032 * \file 00033 * 00034 * $Author: cls-nebadje $ ( \ref _UcfWOscLib ) 00035 * $Date: 2009-01-14 17:16:49 $ 00036 * $Revision: 1.5 $ 00037 * 00038 * Copyright (c) Weiss Engineering Ltd 00039 * 00040 */ 00041 00042 /** 00043 * \mainpage 00044 * 00045 ** 00046 * \section _WOscLibIntro Introduction 00047 * 00048 * This is the documentation of the Weiss OSC Library (WOscLib). 00049 * WOscLib is a complete (server and client), easy to use OSC 00050 * (OpenSound-Control) library, featuring Object Oriented (C++) design 00051 * (modularity), platform independence, type-safety (especially in OSC-methods), 00052 * exception-handling and good documentation (doxygen). 00053 * 00054 * This library is the result of the development of an OSC system at 00055 * Weiss Engineering LTD. in Switzerland. DWE likes to share its 00056 * knowledge and team up with other developers to maintain an enhanceable 00057 * library, accessible through a global cvs or similar version control system. 00058 * 00059 * \subsection _WOscLibImplementations Implementation 00060 * 00061 * This work is a re-implementation and (hopefully) modernization of the 00062 * the classic OSC-Kit, which was originally provided by Matt-Wright and 00063 * was written in pure C (see http://www.cnmat.berkeley.edu/OpenSoundControl). 00064 * 00065 * Matt's kit uses lots of global variables, a fast but user-unfriendly 00066 * memory-allocation (and de-allocation)-scheme, makes use of non type-save 00067 * osc-callback-functions, has no real exception handling and its modularity 00068 * is heavily restricted due to the C-design. There is also no documentation 00069 * based on a modern auto-doc-system (e.g. doxygen) what makes it harder for 00070 * newbies to get an OSC-system running in 10 minutes since they have to read 00071 * all (or at least some) source-files first. 00072 * 00073 * Summary of the reasons of the re-implementation are: 00074 * - Full implementation of OSC 1.0 specification 00075 * - UDP and TCP transport 00076 * - Higher level programming language (C++) and therefore a higher productivity. 00077 * - Enhanced modularity resulting in enhanced code-reuse. 00078 * - <tt> ./configure && make </tt> build process 00079 * - Elimination of global variables and functions to facilitate 00080 * usage of multiple OSC-servers in the same process. 00081 * - Exception handling. 00082 * - Type-save interfaces for OSC arguments in OSC-methods. 00083 * - Dynamic management of OSC-methods. 00084 * - Wildcards ("*" and "?") in address space (methods and containers) 00085 * - Doxygen documentation. 00086 * - Less complex OSC-system implementation. 00087 * 00088 * 00089 * \subsection Platforms 00090 * Currently supported platforms are: 00091 * - Most platforms supported by the GNU Compiler Collection (using g++) and the 00092 * autotools/configure/make tools. 00093 * 00094 ** 00095 * 00096 * \section _WOscLibNotes Acknowledgements 00097 * The authors like to thank Matt Wright for his OSC-Kit, Daniel Weiss for his consent 00098 * to make this library open-source and all contributors. 00099 * 00100 * \section _WOscCopyRight Copyright 00101 * 00102 * \verbatim 00103 00104 WOscLib, an object oriented OSC library. 00105 Copyright (C) 2005 Uli Clemens Franke, Weiss Engineering LTD, Switzerland. 00106 00107 This library is free software; you can redistribute it and/or 00108 modify it under the terms of the GNU Lesser General Public 00109 License as published by the Free Software Foundation; either 00110 version 2.1 of the License, or (at your option) any later version. 00111 00112 This library is distributed in the hope that it will be useful, 00113 but WITHOUT ANY WARRANTY; without even the implied warranty of 00114 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00115 Lesser General Public License for more details. 00116 00117 You should have received a copy of the GNU Lesser General Public 00118 License along with this library; if not, write to the Free Software 00119 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00120 00121 \endverbatim 00122 * 00123 * See \ref WOscLibLgplPage "LGPL" for details. 00124 * 00125 * Parts of the library are based on work of Matt Wright. His code is included 00126 * under the following copyright: 00127 * 00128 * \verbatim 00129 00130 Copyright � 1998. The Regents of the University of California (Regents). 00131 All Rights Reserved. 00132 00133 Written by Matt Wright, The Center for New Music and Audio Technologies, 00134 University of California, Berkeley. 00135 00136 Permission to use, copy, modify, distribute, and distribute modified versions 00137 of this software and its documentation without fee and without a signed 00138 licensing agreement, is hereby granted, provided that the above copyright 00139 notice, this paragraph and the following two paragraphs appear in all copies, 00140 modifications, and distributions. 00141 00142 IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, 00143 SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING 00144 OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS 00145 BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00146 00147 REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00148 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00149 PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED 00150 HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE 00151 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 00152 00153 \endverbatim 00154 * 00155 * 00156 */ 00157 00158 /** 00159 * \page WOscLibOsc_spec_page OSC Specification 00160 * \htmlinclude OSC-spec.html 00161 * \page osc_spec_examples_page OSC Specification Examples 00162 * \htmlinclude OSC-spec-examples.html 00163 * 00164 ** 00165 * \page WOscLibLgplPage GNU Lesser General Public License 00166 * \htmlinclude lgpl.html 00167 */ 00168 00169 /** 00170 * \example WOscClient.cpp 00171 * An example of how to build a full fledged OSC system and how to inherit from 00172 * WOscNetReturn is shown in this example with its header (WOscClient.h) 00173 * prepended here: 00174 * \include WOscClient.h 00175 * 00176 */ 00177 00178 /** 00179 * \example WOscServer.cpp 00180 * Another example with its header (WOscServer.h): 00181 * \include WOscServer.h 00182 */ 00183 00184 /** 00185 * \example WOscStreamingServer.cpp 00186 * OSC server using TCP transport. 00187 */ 00188 00189 /** 00190 * \example WOscStreamingClient.cpp 00191 * OSC client using TCP transport. 00192 */ 00193 00194 // The following ifdef block is the standard way of creating macros which make exporting 00195 // from a DLL simpler. All files within this DLL are compiled with the OSCLIB_EXPORTS 00196 // symbol defined on the command line. this symbol should not be defined on any project 00197 // that uses this DLL. This way any other project whose source files include this file see 00198 // OSCLIB_API functions as being imported from a DLL, whereas this DLL sees symbols 00199 // defined with this macro as being exported. 00200 #ifndef __WOSCLIB_H__ 00201 #define __WOSCLIB_H__ 00202 00203 #include "WOscConfig.h" 00204 00205 /*- switch library type -----------------------------------------------------*/ 00206 00207 /** Library type settings (DLL, static, windows, etc). Set the corresponding 00208 * proprocessor defines in the makefile. 00209 */ 00210 #if WOSCLIB_DYN == 1 && OS_IS_WIN32 == 1 00211 /** when compiling library as DDL */ 00212 # define WOSC_EXPORT __declspec(dllexport) 00213 #elif defined(USE_WOSCLIB_DLL) && OS_IS_WIN32 == 1 00214 /** when using library as DLL */ 00215 # define WOSC_EXPORT __declspec(dllimport) 00216 #else 00217 /** static library and other cases */ 00218 # define WOSC_EXPORT 00219 #endif 00220 00221 /*- misc. configuration -----------------------------------------------------*/ 00222 00223 /** Overloading new and delete globally for custom memory pools. 00224 * Do not define it here (in the main header file) but in a 00225 * separate include file for not affecting the code 00226 * which uses this library. 00227 * 00228 * \verbatim 00229 #include <stdlib.h> // memory 00230 inline void * operator new(size_t size) 00231 { 00232 return malloc(size); 00233 }; 00234 inline void operator delete(void * mem) 00235 { 00236 free(mem); 00237 }; 00238 \endverbatim 00239 * 00240 */ 00241 00242 #endif // #ifndef __WOSCLIB_H__ 00243