Changeset 1191:bd35331c0e20


Ignore:
Timestamp:
03/23/09 10:33:00 (3 years ago)
Author:
niam
Branch:
default
Message:

constructors for internal data types

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cgiFastRequest.inline

    r1189 r1191  
    4545                        struct __request 
    4646                        { 
     47                                /** 
     48                                 * constructor 
     49                                 */ 
     50                                __request() : request(NULL) 
     51                                { 
     52                                } 
     53 
    4754                                FCGX_Request *request; ///< fast-CGI request handler 
    4855                        }; 
  • trunk/src/dataBaseMysql.cc

    r1189 r1191  
    4949                        struct __mysql 
    5050                        { 
     51                                /** 
     52                                 * constructor 
     53                                 */ 
     54                                __mysql() : handle(NULL), 
     55                                                        result(NULL) 
     56                                { 
     57                                } 
     58 
    5159                                MYSQL     *handle; ///< DB handle 
    5260                                MYSQL_RES *result; ///< handle to result 
  • trunk/src/dataBasePostgresql.cc

    r1189 r1191  
    5252                        struct __postgresql 
    5353                        { 
     54                                /** 
     55                                 * constructor 
     56                                 */ 
     57                                __postgresql() : handle(NULL), 
     58                                                                 result(NULL) 
     59                                { 
     60                                } 
     61 
    5462                                PGconn *handle; ///< DB handle 
    5563                                PGresult *result; ///< handlde to result 
     
    111119                                                   handle(new __postgresql) 
    112120{ 
    113         handle->handle = NULL; 
    114  
    115121#ifndef DATABASE_WO_XEXEC 
    116122        collectedData.setExecObject(XEXEC_OBJECT_DATABASEPOSTGRESQL); 
  • trunk/src/dataBaseSqlite.cc

    r1189 r1191  
    5050                        struct __sqlite 
    5151                        { 
     52                                /** 
     53                                 * constructor 
     54                                 */ 
     55                                __sqlite() : handle(NULL), 
     56                                                         result(NULL) 
     57                                { 
     58                                } 
     59 
    5260                                sqlite3 *handle; ///< DB handle 
    5361                                sqlite3_stmt *result; ///< handlde to result 
     
    6270                                   handle(new __sqlite) 
    6371{ 
    64         handle->handle = NULL; 
    65  
    6672#ifndef DATABASE_WO_XEXEC 
    6773        collectedData.setExecObject(XEXEC_OBJECT_DATABASESQLITE); 
     
    7480                                                                                           handle(new __sqlite) 
    7581{ 
    76         handle->handle = NULL; 
    77  
    7882#ifndef DATABASE_WO_XEXEC 
    7983        collectedData.setExecObject(XEXEC_OBJECT_DATABASESQLITE); 
  • trunk/src/dataFormatXmlProcessor.cc

    r1189 r1191  
    5757                                         * constructor 
    5858                                         */ 
    59                                         __node() 
     59                                        __node() : node(NULL) 
    6060                                        { 
    6161                                        } 
     
    6363                                        /** 
    6464                                         * constructor 
     65                                         * @param node defines node handle to assign 
    6566                                         */ 
    6667                                        __node(xmlNodePtr node) : node(node) 
     
    7778                                struct __doc 
    7879                                { 
    79                                         xmlDocPtr document; ///< represents internal libxml2 document data 
     80                                        /** 
     81                                         * constructor 
     82                                         */ 
     83                                        __doc() : doc(NULL) 
     84                                        { 
     85                                        } 
     86 
     87                                        xmlDocPtr doc; ///< represents internal libxml2 document data 
    8088                                }; 
    8189                        }; 
     
    174182{ 
    175183#ifdef LIBXML2_EXT 
    176         xmlFreeDoc(document->document); 
     184        xmlFreeDoc(document->doc); 
    177185        xmlCleanupParser(); 
    178186 
     
    209217{ 
    210218#ifdef LIBXML2_EXT 
    211         xmlFreeDoc(document->document); 
    212  
    213         document->document = xmlParseFile(file.c_str()); 
    214         if (document->document == NULL) 
     219        xmlFreeDoc(document->doc); 
     220 
     221        document->doc = xmlParseFile(file.c_str()); 
     222        if (document->doc == NULL) 
    215223        { 
    216224                xmlErrorPtr error = xmlGetLastError(); 
     
    237245{ 
    238246#ifdef LIBXML2_EXT 
    239         xmlFreeDoc(document->document); 
    240  
    241         document->document = xmlParseMemory(buffer.c_str(), buffer.size()); 
    242         if (document->document == NULL) 
     247        xmlFreeDoc(document->doc); 
     248 
     249        document->doc = xmlParseMemory(buffer.c_str(), buffer.size()); 
     250        if (document->doc == NULL) 
    243251        { 
    244252                xmlErrorPtr error = xmlGetLastError(); 
     
    264272{ 
    265273#ifdef LIBXML2_EXT 
    266         __node xnode = xmlDocGetRootElement(document->document); 
     274        __node xnode = xmlDocGetRootElement(document->doc); 
    267275        if (xnode.node == NULL) 
    268276        { 
     
    586594        } 
    587595 
    588         unsigned char *xChar = xmlNodeListGetString(document->document, xnode.node->children, 1); 
     596        unsigned char *xChar = xmlNodeListGetString(document->doc, xnode.node->children, 1); 
    589597        if (xChar != NULL) 
    590598        { 
     
    734742{ 
    735743#ifdef LIBXML2_EXT 
    736         xmlFreeDoc(document->document); 
    737  
    738         document->document = xmlParseFile(file.c_str()); 
    739         if (document->document == NULL) 
     744        xmlFreeDoc(document->doc); 
     745 
     746        document->doc = xmlParseFile(file.c_str()); 
     747        if (document->doc == NULL) 
    740748        { 
    741749                xmlErrorPtr error = xmlGetLastError(); 
     
    751759        } 
    752760 
    753         xmlNodePtr xnode = xmlDocGetRootElement(document->document); 
     761        xmlNodePtr xnode = xmlDocGetRootElement(document->doc); 
    754762        if (xnode == NULL) 
    755763        { 
     
    778786{ 
    779787#ifdef LIBXML2_EXT 
    780         xmlFreeDoc(document->document); 
    781  
    782         document->document = xmlParseMemory(buffer.c_str(), buffer.size()); 
    783         if (document->document == NULL) 
     788        xmlFreeDoc(document->doc); 
     789 
     790        document->doc = xmlParseMemory(buffer.c_str(), buffer.size()); 
     791        if (document->doc == NULL) 
    784792        { 
    785793                xmlErrorPtr error = xmlGetLastError(); 
     
    795803        } 
    796804 
    797         xmlNodePtr xnode = xmlDocGetRootElement(document->document); 
     805        xmlNodePtr xnode = xmlDocGetRootElement(document->doc); 
    798806        if (xnode == NULL) 
    799807        { 
     
    890898{ 
    891899#ifdef LIBXML2_EXT 
    892         xmlFreeDoc(document->document); 
    893         document->document = NULL; 
     900        xmlFreeDoc(document->doc); 
     901        document->doc = NULL; 
    894902#endif 
    895903} 
  • trunk/src/graphicsImage.cc

    r1189 r1191  
    242242#endif 
    243243{ 
    244         collectedData.handle->im = NULL; 
    245  
    246244#ifndef IMAGEMAGICK_PRE_63 
    247245        collectedData.handle->imInfo = AcquireImageInfo(); 
  • trunk/src/graphicsImage.inline

    r1189 r1191  
    4747                struct __image 
    4848                { 
     49                        /** 
     50                         * contructor 
     51                         */ 
     52                        __image() : im(NULL), 
     53                                                imInfo(NULL) 
     54                        { 
     55                        } 
     56 
    4957                        ImageInfo *imInfo; ///< image info handler 
    5058                        Image     *im;    ///< image handler 
  • trunk/src/ioNetworkSslExchange.cc

    r1189 r1191  
    5151                                                                         handle(new io::ssl::__sslConnection) 
    5252{ 
    53         handle->handle = NULL; 
    5453} 
    5554 
     
    9493        collectedData.setExecObject(XEXEC_OBJECT_IONETWORKSSLEXCHANGE); 
    9594#endif 
    96  
    97         handle->handle = NULL; 
    9895} 
    9996 
  • trunk/src/ioNetworkSslServer.cc

    r1185 r1191  
    6767        collectedData.setExecObject(XEXEC_OBJECT_IONETWORKSSLSERVER); 
    6868#endif 
    69  
    70         ctx->ctx = NULL; 
    7169} 
    7270 
  • trunk/src/ioSsl.inline

    r1189 r1191  
    4545                        struct __sslConnection 
    4646                        { 
     47                                /** 
     48                                 * constructor 
     49                                 */ 
     50                                __sslConnection() : handle(NULL) 
     51                                { 
     52                                } 
     53 
    4754                                SSL *handle;     ///< SSL connection handle 
    4855                        }; 
     
    5461                        struct __sslContext 
    5562                        { 
     63                                /** 
     64                                 * constructor 
     65                                 */ 
     66                                __sslContext() : ctx(NULL) 
     67                                { 
     68                                } 
     69 
    5670                                SSL_CTX *ctx;    ///< SSL context 
    5771                        }; 
  • trunk/tests/dataformatxml_test/test.cc

    r1034 r1191  
    77#include <libdodo/exceptionBasic.h> 
    88#include <libdodo/dataFormatXmlProcessor.h> 
     9#include <libdodo/dataFormatXmlNode.h> 
    910#include <libdodo/toolsMisc.h> 
    1011 
  • utils/shift_inline_comments.sh

    • Property exe set to *
Note: See TracChangeset for help on using the changeset viewer.