URDBServer::~URDBServer() { U_TRACE_UNREGISTER_OBJECT(0, URDBServer) delete rdb; delete URPC::rpc_info; }
UEventTime::~UEventTime() { U_TRACE_UNREGISTER_OBJECT(0, UEventTime) #ifdef USE_LIBEVENT UDispatcher::del(pevent); delete pevent; #endif }
USOAPParser::~USOAPParser() { U_TRACE_UNREGISTER_OBJECT(0, USOAPParser) clearData(); #ifdef U_SOAP_NAMESPACE XMLNStoURN.deallocate(); #endif }
ULog::~ULog() { U_TRACE_UNREGISTER_OBJECT(0, ULog) u_unatexit(&ULog::close); // unregister function of close at exit()... ULog::close(); if (lock) delete lock; }
UProxyPlugIn::~UProxyPlugIn() { U_TRACE_UNREGISTER_OBJECT(0, UProxyPlugIn) delete client_http; if (vservice) { delete vservice; delete vmsg_error; } }
UDBI::~UDBI() { U_TRACE_UNREGISTER_OBJECT(0, UDBI) close(); #if LIBDBI_LIB_CURRENT <= 1 U_SYSCALL_VOID_NO_PARAM(dbi_shutdown); #else U_SYSCALL_VOID(dbi_shutdown_r, "%p", pinst); #endif }
USSIPlugIn::~USSIPlugIn() { U_TRACE_UNREGISTER_OBJECT(0, USSIPlugIn) delete errmsg; delete timefmt; delete docname; if (body) { delete body; delete header; delete alternative_include; } if (environment) delete environment; }
USemaphore::~USemaphore() { U_TRACE_UNREGISTER_OBJECT(0, USemaphore) #ifdef __MINGW32__ ::CloseHandle(sem); #elif defined(U_LOCKFILE) (void) tmp.close(); #else # ifdef U_MAYBE_BROKEN_SEM_IMPL if (broken) (void) U_SYSCALL(pthread_mutex_destroy, "%p", &mutex); else # endif /* Free resources associated with semaphore object sem */ (void) U_SYSCALL(sem_destroy, "%p", sem); if (bmmap) UFile::munmap(sem, sizeof(sem_t)); #endif }
UOptions::~UOptions() { U_TRACE_UNREGISTER_OBJECT(0, UOptions) package.clear(); version.clear(); purpose.clear(); report_bugs.clear(); for (uint32_t i = 0; i < length; ++i) { // NB: we decreases the reference string... item[i].desc->release(); item[i].value->release(); item[i].long_opt->release(); } UMemoryPool::_free(item, capacity, sizeof(option_item)); }
UPosting::~UPosting() { U_TRACE_UNREGISTER_OBJECT(5, UPosting) delete posting; delete filename; delete str_cur_doc_id; if (tbl_name == 0) reset(); else { delete tbl_name; delete tbl_words; } delete word; if (file) { delete file; delete content; } }
#define U_NOT_OUTPUT ((tag_match == false && tag_to_exclude == false) || \ (tag_match == true && tag_to_exclude == true)) UXml2Txt::UXml2Txt(const UString& tag_list, bool _tag_to_exclude, bool _tag_output_also) : taglist(tag_list, "<>, ") { U_TRACE_REGISTER_OBJECT(0, UXml2Txt, "%.*S,%b,%b", U_STRING_TO_TRACE(tag_list), _tag_to_exclude, _tag_output_also) tag_to_exclude = (taglist.empty() == false ? _tag_to_exclude : false); tag_output_also = _tag_output_also; UXMLParser::initParser(false, 0); } UXml2Txt::~UXml2Txt() { U_TRACE_UNREGISTER_OBJECT(0, UXml2Txt) } void UXml2Txt::startElement(const XML_Char* name, const XML_Char** attrs) { U_TRACE(0, "UXml2Txt::startElement(%S,%p)", name, attrs) U_DUMP_ATTRS(attrs) if (taglist.empty()) tag_match = true; else { tag_pos = taglist.find(UString(name)); tag_match = (tag_pos != U_NOT_FOUND); }
// // = AUTHOR // Stefano Casazza // // ============================================================================ #include <ulib/tokenizer.h> #include <ulib/net/client/imap.h> #include <ulib/utility/socket_ext.h> #define U_IMAP_OK "* OK" #define U_IMAP_ERR "* BAD" UImapClient::~UImapClient() { U_TRACE_UNREGISTER_OBJECT(0, UImapClient) } U_NO_EXPORT void UImapClient::setStatus() { U_TRACE_NO_PARAM(0, "UImapClient::setStatus()") const char* descr1; const char* descr2; switch (state) { case LOGOUT: descr1 = "LOGOUT"; break; case NOT_AUTHENTICATED: descr1 = "NOT_AUTHENTICATED"; break; case AUTHENTICATED: descr1 = "AUTHENTICATED"; break; case SELECTED: descr1 = "SELECTED"; break;
// Allocator e Deallocator U_MEMORY_ALLOCATOR U_MEMORY_DEALLOCATOR UHashMap<UString> table; UString radius, location; UVector<UString> fbPermissions; Request() { U_TRACE_REGISTER_OBJECT(5, Request, "") } ~Request() { U_TRACE_UNREGISTER_OBJECT(5, Request) } void clear() { U_TRACE_NO_PARAM(5, "Request::clear()") table.clear(); radius.clear(); location.clear(); fbPermissions.clear(); } void toJSON(UString& json) {
// ULib - c++ library // // = FILENAME // ftp.cpp // // = AUTHOR // Stefano Casazza // // ============================================================================ #include <ulib/net/client/ftp.h> #include <ulib/utility/socket_ext.h> UFtpClient::~UFtpClient() { U_TRACE_UNREGISTER_OBJECT(0, UFtpClient) } void UFtpClient::setStatus() { U_TRACE_NO_PARAM(0, "UFtpClient::setStatus()") const char* descr; switch (response) { case 110: descr = "Restart marker reply"; break; case 120: descr = "Service ready in nnn minutes"; break; case FTP_DATA_CONNECTION_OPEN: descr = "Data connection already open; transfer starting"; break; case FTP_OPENING_DATA_CONNECTION: descr = "File status okay; about to open data connection"; break; case FTP_COMMAND_OK: descr = "Command okay"; break;
// Stefano Casazza // // ============================================================================ #include <ulib/net/socket.h> #include <ulib/orm/driver/orm_driver_mysql.h> extern "C" { #include <mysql/errmsg.h> } U_CREAT_FUNC(orm_driver_mysql, UOrmDriverMySql) UOrmDriverMySql::~UOrmDriverMySql() { U_TRACE_UNREGISTER_OBJECT(0, UOrmDriverMySql) } void UOrmDriverMySql::handlerError() { U_TRACE_NO_PARAM(0, "UOrmDriverMySql::UOrmDriverMySql()") U_INTERNAL_ASSERT_POINTER(UOrmDriver::connection) // Translation table for error status codes struct error_value_info { int value; // The numeric value const char* name; // The equivalent symbolic value };
UHttpPlugIn::~UHttpPlugIn() { U_TRACE_UNREGISTER_OBJECT(0, UHttpPlugIn) UHTTP::dtor(); // delete global HTTP context... }
Person() { U_TRACE_REGISTER_OBJECT(5, Person, "") _age = 0; } Person(const UString& ln, const UString& fn, const UString& adr, int a) : _lastName(ln), _firstName(fn), _address(adr), _age(a) { U_TRACE_REGISTER_OBJECT(5, Person, "%.*S,%.*S,%.*S,%u", U_STRING_TO_TRACE(ln), U_STRING_TO_TRACE(fn), U_STRING_TO_TRACE(adr), a) } ~Person() { U_TRACE_UNREGISTER_OBJECT(5, Person) } bool operator==(const Person& other) const { return _lastName == other._lastName && _firstName == other._firstName && _address == other._address && _age == other._age; } bool operator<(const Person& p) const { if ( _age < p._age || _lastName < p._lastName || _firstName < p._firstName)
#include <stdlib.h> class Genitore { public: U_MEMORY_TEST Genitore(const char* n = "genitore") { U_TRACE_REGISTER_OBJECT(5,Genitore,"%S",n) nome = n; } ~Genitore() { U_TRACE_UNREGISTER_OBJECT(5,Genitore) } Genitore(const Genitore& g) { *this = g; } Genitore& operator=(const Genitore& g) { nome = g.nome; return *this; } // friend ostream& operator<<(ostream& os, const Genitore& genitore) { return os << genitore.nome; } const char* dump(bool) const { return nome; }
dataList.clear(); } UBaseTransform::UBaseTransform() { U_TRACE_REGISTER_OBJECT(0, UBaseTransform, "") status = 0; hereNode = 0; operation = 0; } UBaseTransform::~UBaseTransform() { U_TRACE_UNREGISTER_OBJECT(0, UBaseTransform) } bool UTranformXPointer::setExpr(const char* expr, int nodeSetType, xmlNodePtr node) { U_TRACE(0, "UTranformXPointer::setExpr(%S,%d,%p)", expr, nodeSetType, node) UBaseTransform::hereNode = node; UXPathData* data; U_NEW(UXPathData, data, UXPathData(UXPathData::XPOINTER, nodeSetType, expr)); if (data->registerNamespaces(node)) { dataList.push(data);
UNodeSet::~UNodeSet() { U_TRACE_UNREGISTER_OBJECT(0, UNodeSet) destroy(this); }
UTranformXPointer::~UTranformXPointer() { U_TRACE_UNREGISTER_OBJECT(0, UTranformXPointer) dataList.clear(); }
static char buffer[4096]; class MyAlarm1 : public UEventTime { public: // COSTRUTTORI MyAlarm1(long sec, long usec) : UEventTime(sec, usec) { U_TRACE_REGISTER_OBJECT(0, MyAlarm1, "%ld,%ld", sec, usec) } virtual ~MyAlarm1() { U_TRACE_UNREGISTER_OBJECT(0, MyAlarm1) } virtual int handlerTime() { U_TRACE(0+256, "MyAlarm1::handlerTime()") // return value: // --------------- // -1 - normal // 0 - monitoring // --------------- cout.write(buffer, u__snprintf(buffer, sizeof(buffer), "MyAlarm1::handlerTime() u_now = %1D expire = %#1D\n", UEventTime::expire())); U_RETURN(-1);
public: // OBJECT SERVICE // URPCMethod provides an interface for the things that methods most know how to do class AddMethod : public URPCMethod { public: AddMethod() : buffer(U_CAPACITY) { U_TRACE_REGISTER_OBJECT(5, AddMethod, "", 0) } virtual ~AddMethod() { U_TRACE_UNREGISTER_OBJECT(5, AddMethod) } virtual UString getMethodName() const { return U_STRING_FROM_CONSTANT("add"); } // Transforms the method into something that SOAP servers and clients can send. // The encoder holds the actual data while the client hands data to be entered in virtual void encode() { U_TRACE(5, "AddMethod::encode()") if (hasFailed()) U_SOAP_ENCODE_RES(buffer); else U_SOAP_ENCODE_ARG(returnValue); }