/* UpTools v8.6 * * Copyright (c) 2005-2011 Fundacion Universidad de Palermo (Argentina). * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: 'This product includes software developed by the * "Universidad de Palermo, Argentina" (http://www.palermo.edu/).' * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ ------------------------------------------------------------------------------ UPTOOLS INTRODUCTION 1. Using UpTools classes and templates 1.1 Linking and including UpTools in a project 2. Multithreading 2.1 Threads 2.2 Mutual exclusion, semaphores, and read/write locks 2.3 Conditions 2.4 Thread specific data 2.5 Load distribution and parallel processing 2.6 Load distribution with I/O 3. Time and scheduling 3.1 Time handling 3.2 Scheduling and multithreading 4. Memory management 4.1 Smart objects and pointers 4.2 Shared containers and objects 4.3 Memory hugs 5. Text and strings 5.1 Operators on strings 5.2 Regular expressions (posix) 5.3 Replace and substitutions 6. Databases 6.1 Common interface to various databases 6.2 Multithreading database access 7. Networking 7.1 Address management 7.2 Domain name system access 7.3 Asynchronous DNS access 7.4 Sockets 7.5 Networks 7.6 SSL and TLS 8. Input / output 8.1 Handling multiple simultaneous communications 8.2 Load distribution with I/O 8.3 Line parsing 9. Other 9.1 Configuration parsing 9.2 Text and Address indexed containers ------------------------------------------------------------------------------ 1. Using UpTools classes and templates 1.1 Linking and including UpTools in a project UpTools is composed of a collection of classes and templates. Some of them are inline. Most of them are included in the libUpTools.so (and libUpTools.a), so they need -lUpTools to be included in the compiler options. When linking the libUpTools dinamically, the linker automatically links also other libraries that may be needed, depending on the included classes. When linking the libUpTools statically, the required libraries must be included explicitly. The following is a list of the UpTools classes and templates, and the required libraries (in addition to -lUpTools) for each class. classes in libUpTools.a (and libUpTools.so): class UpAddress class UpSockAddr class UpHost class UpSocket class UpNet class UpRoute class UpTimeVal class UpLine class UpRegex class UpSubstitute class UpConf class DnsQueryType class UpTimerManager (needs -lpthread) class UpThread (needs -lpthread) class UpWork (needs -lpthread) class UpWorkSplittable (needs -lpthread) class UpThreadWorkDistributor (needs -lpthread) class UpResolver (needs -lpthread -lresolv) class UpDnsQuery (needs -lpthread -lresolv) class UpNaptrQuery (needs -lpthread -lresolv) class UpResolverSimple (needs -lresolv) class UpDnsQuerySimple (needs -lresolv) class UpResourceRecord (needs -lpthread -lresolv) class UpSqlQuery class UpSqlConn class UpSqlConnPool class UpSqlConnMysql (needs -L/usr/lib/mysql -lmysqlclient) class UpSqlConnPgsql (needs -lpq) class UpCryptoSslLibMultithreading (needs -lcrypto -lssl -lpthread) class UpCryptoSslLib (needs -lcrypto -lssl) class UpSslContext (needs -lcrypto -lssl) class UpSsl (needs -lcrypto -lssl) class UpRsa (needs -lcrypto -lssl) class UpX509 (needs -lcrypto -lssl) Inline classes: class UpHash class UpEq class UpLessThan class StrStrHashMap; class StrStrHashMultiMap; class StrStrMap; class StrStrMultiMap; class StrHashSet; class StrHashMultiSet; class StrSet; class StrMultiSet; class UpTimer (needs -lpthread) class UpMutex (needs -lpthread) class UpRWLock (needs -lpthread) class UpScopedLock (needs -lpthread) class UpSemaphore (needs -lpthread) template UpCondition (needs -lpthread) template UpThreadSpecificPtr (needs -lpthread) template UpThreadSpecificSmartPtr (needs -lpthread) template UpBuf template UpSelect template UpSmartLinkPtr (needs -lpthread if compiled with -DDEBUGSMARTPTR) class UpLinkable (needs -lpthread if compiled with -DDEBUGSMARTPTR) global operators and functions: UpOp.h for string interactions (Old versions of glibc and postgresql may need other linking details, see specific readme file) ------------------------------------------------------------------------------- ...TUTORIAL IN PROGRESS