From ea021e1d96332824db9b844537c391cb58463828 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 15 Dec 2019 17:27:22 +0800 Subject: [PATCH] Fix module bitsets and default session values --- .../game_share/generate_module_interface.xslt | 76 ++- .../game_share/ring_session_manager_itf.cpp | 45 +- .../src/game_share/ring_session_manager_itf.h | 495 +++++++++--------- .../game_share/ring_session_manager_itf.xml | 6 +- .../database_mapping.cpp | 201 +++---- .../shard_unifier_service/database_mapping.h | 245 +++++---- .../database_mapping.xml | 44 +- 7 files changed, 590 insertions(+), 522 deletions(-) diff --git a/code/ryzom/common/src/game_share/generate_module_interface.xslt b/code/ryzom/common/src/game_share/generate_module_interface.xslt index 8d32922fe..09cf2039b 100644 --- a/code/ryzom/common/src/game_share/generate_module_interface.xslt +++ b/code/ryzom/common/src/game_share/generate_module_interface.xslt @@ -20,6 +20,22 @@ +// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// @@ -632,7 +648,7 @@ namespace - typedef NLMISC::CEnumBitset < Enum, uint32, Enum::invalid_val, ',', NLMISC::TContainedEnum < Enum, uint32 >, Enum::TValues > ; + typedef NLMISC::CEnumBitset < Enum, uint32, Enum::max_val, ',', NLMISC::TContainedEnum < Enum, uint32 >, Enum::TValues > ; @@ -668,7 +684,13 @@ namespace end_of_enum, + + empty_val = 0, + max_val = ((uint32) << 1) - 1, + + invalid_val, + /// Number of enumerated values nb_enum_items = @@ -697,12 +719,16 @@ namespace { NL_BEGIN_STRING_CONVERSION_TABLE(TValues) NL_STRING_CONVERSION_TABLE_ENTRY() - NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; + + NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) + }; static NLMISC::CStringConversion<TValues> conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); - + / sizeof(TValues_nl_string_conversion_table[0]), + empty_val); + + invalid_val); + return conversionTable; } @@ -710,8 +736,10 @@ namespace public: () - : _Value(invalid_val) - { + : _Value(empty_val) + + : _Value(invalid_val) + { } (TValues value) : _Value(value) @@ -772,9 +800,9 @@ namespace // return true if the actual value of the enum is valid, otherwise false bool isValid() { - if (_Value == invalid_val) + if (_Value == invalid_val) return false; - + // not invalid, check other enum value return getConversionTable().isValid(_Value); } @@ -1682,7 +1710,7 @@ namespace while (!childs.empty()) { - getByIndex(childs.size()-1)->remove(connection); + getByIndex((uint32)childs.size()-1)->remove(connection); } } @@ -1886,7 +1914,7 @@ namespace } else if (cmd == NOPE::cc_instance_count) { - return _ObjectCache.size(); + return (uint32)_ObjectCache.size(); } // default return value @@ -1904,7 +1932,7 @@ namespace TReleasedObject::iterator first(_ReleasedObject.begin()), last(_ReleasedObject.end()); for (; first != last; ++first) { - nbReleased += first->second.size(); + nbReleased += (uint32)first->second.size(); } nlinfo(" There are %u object instances in cache not referenced (waiting deletion or re-use))", nbReleased); @@ -2117,7 +2145,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification return false; } - std::auto_ptr<MSW::CStoreResult> result = connection.storeResult(); + CUniquePtr<MSW::CStoreResult> result = connection.storeResult(); for (uint i=0; i<result->getNumRows(); ++i) { @@ -2195,7 +2223,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification return false; } - std::auto_ptr<MSW::CStoreResult> result = connection.storeResult(); + CUniquePtr<MSW::CStoreResult> result = connection.storeResult(); // check that the data description is consistent with database content nlassert(result->getNumRows() <= 1); @@ -2300,9 +2328,9 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification } // no object with this id, return a null pointer - static Ptr nil; + static Ptr nilPtr; - return nil; + return nilPtr; } @@ -2321,8 +2349,8 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification if (it == _->end()) { // no object with this id, return a null pointer - static Ptr nil; - return nil; + static Ptr nilPtr; + return nilPtr; } return const_cast< Ptr & >(it->second); @@ -2383,7 +2411,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification protected: /// the callback server adaptor - std::auto_ptr<ICallbackServerAdaptor> _CallbackServer; + CUniquePtr<ICallbackServerAdaptor> _CallbackServer; void getCallbakArray(NLNET::TCallbackItem *&arrayPtr, uint32 &arraySize) { @@ -2430,12 +2458,12 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification if (replacementAdaptor == NULL) { // use default callback server - _CallbackServer = std::auto_ptr<ICallbackServerAdaptor>(new CNelCallbackServerAdaptor(this)); + _CallbackServer = CUniquePtr<ICallbackServerAdaptor>(new CNelCallbackServerAdaptor(this)); } else { // use the replacement one - _CallbackServer = std::auto_ptr<ICallbackServerAdaptor>(replacementAdaptor); + _CallbackServer = CUniquePtr<ICallbackServerAdaptor>(replacementAdaptor); } } @@ -2591,7 +2619,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification protected: /// the callback client adaptor - std::auto_ptr < ICallbackClientAdaptor > _CallbackClient; + CUniquePtr<ICallbackClientAdaptor> _CallbackClient; void getCallbakArray(NLNET::TCallbackItem *&arrayPtr, uint32 &arraySize) @@ -2660,12 +2688,12 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification if (adaptorReplacement == NULL) { // use the default Nel adaptor - _CallbackClient = std::auto_ptr < ICallbackClientAdaptor >(new CNelCallbackClientAdaptor(this)); + _CallbackClient = CUniquePtr<ICallbackClientAdaptor>(new CNelCallbackClientAdaptor(this)); } else { // use the replacement one - _CallbackClient = std::auto_ptr < ICallbackClientAdaptor >(adaptorReplacement); + _CallbackClient = CUniquePtr<ICallbackClientAdaptor>(adaptorReplacement); } } diff --git a/code/ryzom/common/src/game_share/ring_session_manager_itf.cpp b/code/ryzom/common/src/game_share/ring_session_manager_itf.cpp index 4db1bd6aa..584a68566 100644 --- a/code/ryzom/common/src/game_share/ring_session_manager_itf.cpp +++ b/code/ryzom/common/src/game_share/ring_session_manager_itf.cpp @@ -1,3 +1,4 @@ + // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // @@ -19,7 +20,7 @@ ///////////////////////////////////////////////////////////////// #include "stdpch.h" - + #include "ring_session_manager_itf.h" namespace RSMGR @@ -28,7 +29,7 @@ namespace RSMGR ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// - + const CRingSessionManagerSkel::TMessageHandlerMap &CRingSessionManagerSkel::getMessageHandlers() const { @@ -38,31 +39,31 @@ namespace RSMGR if (!init) { std::pair < TMessageHandlerMap::iterator, bool > res; - + res = handlers.insert(std::make_pair(std::string("RDSS"), &CRingSessionManagerSkel::registerDSS_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("SSC"), &CRingSessionManagerSkel::sessionCreated_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("RSE"), &CRingSessionManagerSkel::reportSessionEvent_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("SCS"), &CRingSessionManagerSkel::scenarioStarted_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("RCK"), &CRingSessionManagerSkel::reportCharacterKicked_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("SCE"), &CRingSessionManagerSkel::scenarioEnded_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + init = true; } @@ -85,7 +86,7 @@ namespace RSMGR return true; } - + void CRingSessionManagerSkel::registerDSS_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message) { H_AUTO(CRingSessionManagerSkel_registerDSS_RDSS); @@ -339,7 +340,7 @@ namespace RSMGR ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// - + const CRingSessionManagerClientSkel::TMessageHandlerMap &CRingSessionManagerClientSkel::getMessageHandlers() const { @@ -349,43 +350,43 @@ namespace RSMGR if (!init) { std::pair < TMessageHandlerMap::iterator, bool > res; - + res = handlers.insert(std::make_pair(std::string("CSS"), &CRingSessionManagerClientSkel::createSession_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("AHC"), &CRingSessionManagerClientSkel::addCharacterInSession_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("CLSDSS"), &CRingSessionManagerClientSkel::closeSession_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("SH"), &CRingSessionManagerClientSkel::stopHibernation_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("CK"), &CRingSessionManagerClientSkel::characterKicked_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("CUK"), &CRingSessionManagerClientSkel::characterUnkicked_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("STOCTA"), &CRingSessionManagerClientSkel::teleportOneCharacterToAnother_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("SHSA"), &CRingSessionManagerClientSkel::hibernateSession_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + res = handlers.insert(std::make_pair(std::string("SSSP"), &CRingSessionManagerClientSkel::setSessionStartParams_skel)); // if this assert, you have a doubly message name in your interface definition ! nlassert(res.second); - + init = true; } @@ -408,7 +409,7 @@ namespace RSMGR return true; } - + void CRingSessionManagerClientSkel::createSession_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message) { H_AUTO(CRingSessionManagerClientSkel_createSession_CSS); diff --git a/code/ryzom/common/src/game_share/ring_session_manager_itf.h b/code/ryzom/common/src/game_share/ring_session_manager_itf.h index 0921a228c..19a261fbf 100644 --- a/code/ryzom/common/src/game_share/ring_session_manager_itf.h +++ b/code/ryzom/common/src/game_share/ring_session_manager_itf.h @@ -1,3 +1,4 @@ + // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // @@ -33,22 +34,22 @@ #include "game_share/callback_adaptor.h" #include "nel/misc/entity_id.h" - + #include "game_share/r2_basic_types.h" - + #include "game_share/r2_share_itf.h" - + #include "nel/net/login_cookie.h" - + #include "game_share/welcome_service_itf.h" - + #include "game_share/character_sync_itf.h" - + #include "game_share/security_check.h" - + namespace RSMGR { - + class TRunningSessionInfo; class TSessionDesc; @@ -78,7 +79,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 7 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -94,13 +95,13 @@ namespace RSMGR indexTable.insert(std::make_pair(sps_playing, 4)); indexTable.insert(std::make_pair(sps_editing, 5)); indexTable.insert(std::make_pair(sps_animating, 6)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -116,7 +117,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -194,16 +196,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TSessionType { @@ -223,7 +225,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 4 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -236,13 +238,13 @@ namespace RSMGR indexTable.insert(std::make_pair(st_anim, 1)); indexTable.insert(std::make_pair(st_outland, 2)); indexTable.insert(std::make_pair(st_mainland, 3)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -255,7 +257,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -333,16 +336,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TSessionOrientation { @@ -364,7 +367,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 6 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -379,13 +382,13 @@ namespace RSMGR indexTable.insert(std::make_pair(so_hack_slash, 3)); indexTable.insert(std::make_pair(so_guild_training, 4)); indexTable.insert(std::make_pair(so_other, 5)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -400,7 +403,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -478,16 +482,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TSessionState { @@ -507,7 +511,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 4 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -520,13 +524,13 @@ namespace RSMGR indexTable.insert(std::make_pair(ss_open, 1)); indexTable.insert(std::make_pair(ss_locked, 2)); indexTable.insert(std::make_pair(ss_closed, 3)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -539,7 +543,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -617,16 +622,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TAnimMode { @@ -644,7 +649,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 2 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -655,13 +660,13 @@ namespace RSMGR // fill the index table indexTable.insert(std::make_pair(am_dm, 0)); indexTable.insert(std::make_pair(am_autonomous, 1)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -672,7 +677,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -750,16 +756,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TAccessType { @@ -777,7 +783,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 2 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -788,13 +794,13 @@ namespace RSMGR // fill the index table indexTable.insert(std::make_pair(at_public, 0)); indexTable.insert(std::make_pair(at_private, 1)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -805,7 +811,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -883,16 +890,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TRuleType { @@ -910,7 +917,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 2 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -921,13 +928,13 @@ namespace RSMGR // fill the index table indexTable.insert(std::make_pair(rt_strict, 0)); indexTable.insert(std::make_pair(rt_liberal, 1)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -938,7 +945,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -1016,16 +1024,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TLevelFilterEnum { @@ -1037,13 +1045,14 @@ namespace RSMGR lf_d = 8, lf_e = 16, lf_f = 32, - - invalid_val, + + empty_val = 0, + max_val = ((uint32)lf_f << 1) - 1, /// Number of enumerated values nb_enum_items = 6 }; - + static const NLMISC::CStringConversion &getConversionTable() { @@ -1054,11 +1063,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(lf_d) NL_STRING_CONVERSION_TABLE_ENTRY(lf_e) NL_STRING_CONVERSION_TABLE_ENTRY(lf_f) - NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + empty_val); return conversionTable; } @@ -1067,7 +1076,7 @@ namespace RSMGR public: TLevelFilterEnum() - : _Value(invalid_val) + : _Value(empty_val) { } TLevelFilterEnum(TValues value) @@ -1129,17 +1138,15 @@ namespace RSMGR // return true if the actual value of the enum is valid, otherwise false bool isValid() { - if (_Value == invalid_val) - return false; // not invalid, check other enum value return getConversionTable().isValid(_Value); } - + }; - - typedef NLMISC::CEnumBitset < TLevelFilterEnum, uint32, TLevelFilterEnum::invalid_val, ',', NLMISC::TContainedEnum < TLevelFilterEnum, uint32 >, TLevelFilterEnum::TValues > TLevelFilter; + + typedef NLMISC::CEnumBitset < TLevelFilterEnum, uint32, TLevelFilterEnum::max_val, ',', NLMISC::TContainedEnum < TLevelFilterEnum, uint32 >, TLevelFilterEnum::TValues > TLevelFilter; struct TEstimatedDuration @@ -1159,7 +1166,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 3 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -1171,13 +1178,13 @@ namespace RSMGR indexTable.insert(std::make_pair(et_short, 0)); indexTable.insert(std::make_pair(et_medium, 1)); indexTable.insert(std::make_pair(et_long, 2)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -1189,7 +1196,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -1267,16 +1275,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TRaceFilterEnum { @@ -1286,13 +1294,14 @@ namespace RSMGR rf_matis = 2, rf_tryker = 4, rf_zorai = 8, - - invalid_val, + + empty_val = 0, + max_val = ((uint32)rf_zorai << 1) - 1, /// Number of enumerated values nb_enum_items = 4 }; - + static const NLMISC::CStringConversion &getConversionTable() { @@ -1301,11 +1310,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(rf_matis) NL_STRING_CONVERSION_TABLE_ENTRY(rf_tryker) NL_STRING_CONVERSION_TABLE_ENTRY(rf_zorai) - NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + empty_val); return conversionTable; } @@ -1314,7 +1323,7 @@ namespace RSMGR public: TRaceFilterEnum() - : _Value(invalid_val) + : _Value(empty_val) { } TRaceFilterEnum(TValues value) @@ -1376,17 +1385,15 @@ namespace RSMGR // return true if the actual value of the enum is valid, otherwise false bool isValid() { - if (_Value == invalid_val) - return false; // not invalid, check other enum value return getConversionTable().isValid(_Value); } - + }; - - typedef NLMISC::CEnumBitset < TRaceFilterEnum, uint32, TRaceFilterEnum::invalid_val, ',', NLMISC::TContainedEnum < TRaceFilterEnum, uint32 >, TRaceFilterEnum::TValues > TRaceFilter; + + typedef NLMISC::CEnumBitset < TRaceFilterEnum, uint32, TRaceFilterEnum::max_val, ',', NLMISC::TContainedEnum < TRaceFilterEnum, uint32 >, TRaceFilterEnum::TValues > TRaceFilter; struct TReligionFilterEnum @@ -1396,13 +1403,14 @@ namespace RSMGR rf_kami = 1, rf_karavan = 2, rf_neutral = 4, - - invalid_val, + + empty_val = 0, + max_val = ((uint32)rf_neutral << 1) - 1, /// Number of enumerated values nb_enum_items = 3 }; - + static const NLMISC::CStringConversion &getConversionTable() { @@ -1410,11 +1418,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(rf_kami) NL_STRING_CONVERSION_TABLE_ENTRY(rf_karavan) NL_STRING_CONVERSION_TABLE_ENTRY(rf_neutral) - NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + empty_val); return conversionTable; } @@ -1423,7 +1431,7 @@ namespace RSMGR public: TReligionFilterEnum() - : _Value(invalid_val) + : _Value(empty_val) { } TReligionFilterEnum(TValues value) @@ -1485,17 +1493,15 @@ namespace RSMGR // return true if the actual value of the enum is valid, otherwise false bool isValid() { - if (_Value == invalid_val) - return false; // not invalid, check other enum value return getConversionTable().isValid(_Value); } - + }; - - typedef NLMISC::CEnumBitset < TReligionFilterEnum, uint32, TReligionFilterEnum::invalid_val, ',', NLMISC::TContainedEnum < TReligionFilterEnum, uint32 >, TReligionFilterEnum::TValues > TReligionFilter; + + typedef NLMISC::CEnumBitset < TReligionFilterEnum, uint32, TReligionFilterEnum::max_val, ',', NLMISC::TContainedEnum < TReligionFilterEnum, uint32 >, TReligionFilterEnum::TValues > TReligionFilter; struct TGuildFilter @@ -1514,7 +1520,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 2 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -1525,13 +1531,13 @@ namespace RSMGR // fill the index table indexTable.insert(std::make_pair(gf_only_my_guild, 0)); indexTable.insert(std::make_pair(gf_any_player, 1)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -1542,7 +1548,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -1620,16 +1627,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + struct TShardFilterEnum { @@ -1666,13 +1673,15 @@ namespace RSMGR sf_shard28 = 1<<28, sf_shard29 = 1<<29, sf_shard30 = 1<<30, - - invalid_val, + sf_shard31 = 1<<31, + + empty_val = 0, + max_val = ((uint32)sf_shard31 << 1) - 1, /// Number of enumerated values - nb_enum_items = 31 + nb_enum_items = 32 }; - + static const NLMISC::CStringConversion &getConversionTable() { @@ -1708,11 +1717,12 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard28) NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard29) NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard30) - NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) + NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard31) }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + empty_val); return conversionTable; } @@ -1721,7 +1731,7 @@ namespace RSMGR public: TShardFilterEnum() - : _Value(invalid_val) + : _Value(empty_val) { } TShardFilterEnum(TValues value) @@ -1783,17 +1793,15 @@ namespace RSMGR // return true if the actual value of the enum is valid, otherwise false bool isValid() { - if (_Value == invalid_val) - return false; // not invalid, check other enum value return getConversionTable().isValid(_Value); } - + }; - - typedef NLMISC::CEnumBitset < TShardFilterEnum, uint32, TShardFilterEnum::invalid_val, ',', NLMISC::TContainedEnum < TShardFilterEnum, uint32 >, TShardFilterEnum::TValues > TShardFilter; + + typedef NLMISC::CEnumBitset < TShardFilterEnum, uint32, TShardFilterEnum::max_val, ',', NLMISC::TContainedEnum < TShardFilterEnum, uint32 >, TShardFilterEnum::TValues > TShardFilter; // Info about a running session in a DSS ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -1858,7 +1866,7 @@ namespace RSMGR _NbPlayingChars = value; } - + bool operator == (const TRunningSessionInfo &other) const { return _SessionId == other._SessionId @@ -1882,10 +1890,10 @@ namespace RSMGR s.serial(_NbPlayingChars); } - + private: - + }; @@ -1912,7 +1920,7 @@ namespace RSMGR /// Number of enumerated values nb_enum_items = 3 }; - + /// Index table to convert enum value to linear index table const std::map &getIndexTable() const { @@ -1924,13 +1932,13 @@ namespace RSMGR indexTable.insert(std::make_pair(se_char_enter, 0)); indexTable.insert(std::make_pair(se_char_leave, 1)); indexTable.insert(std::make_pair(se_session_closing, 2)); - + init = true; } return indexTable; } - + static const NLMISC::CStringConversion &getConversionTable() { @@ -1942,7 +1950,8 @@ namespace RSMGR }; static NLMISC::CStringConversion conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -2020,16 +2029,16 @@ namespace RSMGR return getConversionTable().isValid(_Value); } - + uint32 asIndex() { std::map::const_iterator it(getIndexTable().find(_Value)); nlassert(it != getIndexTable().end()); return it->second; } - + }; - + ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// @@ -2055,9 +2064,9 @@ namespace RSMGR // unused interceptors std::string fwdBuildModuleManifest() const { return std::string(); } - void fwdOnModuleUp(NLNET::IModuleProxy * /* moduleProxy */) {} - void fwdOnModuleDown(NLNET::IModuleProxy * /* moduleProxy */) {} - void fwdOnModuleSecurityChange(NLNET::IModuleProxy * /* moduleProxy */) {} + void fwdOnModuleUp(NLNET::IModuleProxy *moduleProxy) {} + void fwdOnModuleDown(NLNET::IModuleProxy *moduleProxy) {} + void fwdOnModuleSecurityChange(NLNET::IModuleProxy *moduleProxy) {} // process module message interceptor bool fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message); @@ -2068,7 +2077,7 @@ namespace RSMGR const TMessageHandlerMap &getMessageHandlers() const; - + void registerDSS_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message); void sessionCreated_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message); @@ -2175,22 +2184,22 @@ namespace RSMGR // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_registerDSS(NLNET::CMessage &__message, uint32 shardId, const std::vector < TRunningSessionInfo > &runningSessions); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_sessionCreated(NLNET::CMessage &__message, const RSMGR::TRunningSessionInfo &sessionInfo); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_reportSessionEvent(NLNET::CMessage &__message, RSMGR::TSessionEvent event, TSessionId sessionId, uint32 charId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_scenarioStarted(NLNET::CMessage &__message, TSessionId sessionId, const R2::TRunningScenarioInfo &scenarioInfo); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_reportCharacterKicked(NLNET::CMessage &__message, TSessionId sessionId, uint32 charId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_scenarioEnded(NLNET::CMessage &__message, TSessionId sessionId, const R2::TRunningScenarioInfo &scenarioInfo, uint32 rrpScored, uint32 scenarioPointScored, uint32 timeTaken, const std::vector < uint32 > &participants); - + @@ -2221,9 +2230,9 @@ namespace RSMGR // unused interceptors std::string fwdBuildModuleManifest() const { return std::string(); } - void fwdOnModuleUp(NLNET::IModuleProxy * /* moduleProxy */) {} - void fwdOnModuleDown(NLNET::IModuleProxy * /* moduleProxy */) {} - void fwdOnModuleSecurityChange(NLNET::IModuleProxy * /* moduleProxy */) {} + void fwdOnModuleUp(NLNET::IModuleProxy *moduleProxy) {} + void fwdOnModuleDown(NLNET::IModuleProxy *moduleProxy) {} + void fwdOnModuleSecurityChange(NLNET::IModuleProxy *moduleProxy) {} // process module message interceptor bool fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message); @@ -2234,7 +2243,7 @@ namespace RSMGR const TMessageHandlerMap &getMessageHandlers() const; - + void createSession_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message); void addCharacterInSession_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message); @@ -2357,38 +2366,38 @@ namespace RSMGR // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_createSession(NLNET::CMessage &__message, uint32 ownerCharId, TSessionId sessionId, const RSMGR::TSessionType &type); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_addCharacterInSession(NLNET::CMessage &__message, TSessionId sessionId, uint32 charId, const WS::TUserRole &enterAs, const std::string &ringAccess, bool newcomer); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_closeSession(NLNET::CMessage &__message, TSessionId sessionId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_stopHibernation(NLNET::CMessage &__message, TSessionId sessionId, uint32 ownerId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_characterKicked(NLNET::CMessage &__message, TSessionId sessionId, uint32 charId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_characterUnkicked(NLNET::CMessage &__message, TSessionId sessionId, uint32 charId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_teleportOneCharacterToAnother(NLNET::CMessage &__message, TSessionId sessionId, uint32 sourceCharId, uint32 destCharId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_hibernateSession(NLNET::CMessage &__message, TSessionId sessionId); - + // Message serializer. Return the message received in reference for easier integration static const NLNET::CMessage &buildMessageFor_setSessionStartParams(NLNET::CMessage &__message, uint32 charId, TSessionId sessionId, const std::string &initialIslandLocation, const std::string &initialEntryPointLocation, const std::string &initialSeason); - + }; // Callback interface used by web server during 'outgame' operation - class CRingSessionManagerWebItf + class CRingSessionManagerWebItf { protected: @@ -3853,12 +3862,12 @@ namespace RSMGR * Derive from this class to invoke method on the callback server */ - class CRingSessionManagerWebClientItf + class CRingSessionManagerWebClientItf { protected: /// the callback client adaptor - CUniquePtr < ICallbackClientAdaptor > _CallbackClient; + CUniquePtr _CallbackClient; void getCallbakArray(NLNET::TCallbackItem *&arrayPtr, uint32 &arraySize) @@ -3922,12 +3931,12 @@ namespace RSMGR if (adaptorReplacement == NULL) { // use the default Nel adaptor - _CallbackClient = CUniquePtr < ICallbackClientAdaptor >(new CNelCallbackClientAdaptor(this)); + _CallbackClient = CUniquePtr(new CNelCallbackClientAdaptor(this)); } else { // use the replacement one - _CallbackClient = CUniquePtr < ICallbackClientAdaptor >(adaptorReplacement); + _CallbackClient = CUniquePtr(adaptorReplacement); } } @@ -4826,48 +4835,48 @@ namespace RSMGR class TSessionDesc { protected: - // + // TSessionId _SessionId; - // + // bool _RequesterCharInvited; - // + // bool _RequesterCharKicked; - // + // std::string _OwnerName; - // + // std::string _Title; - // + // std::string _Description; - // + // TAnimMode _AnimMode; - // + // R2::TSessionLevel _SessionLevel; - // + // bool _AllowFreeTrial; - // + // uint32 _LaunchDate; - // + // uint32 _NbConnectedPlayer; - // + // std::string _Language; - // + // TSessionOrientation _Orientation; - // + // uint32 _NbRating; - // + // uint32 _RateFun; - // + // uint32 _RateDifficulty; - // + // uint32 _RateAccessibility; - // + // uint32 _RateOriginality; - // + // uint32 _RateDirection; - // + // uint32 _ScenarioRRPTotal; public: - // + // TSessionId getSessionId() const { return _SessionId; @@ -4879,7 +4888,7 @@ namespace RSMGR _SessionId = value; } - // + // bool getRequesterCharInvited() const { return _RequesterCharInvited; @@ -4891,7 +4900,7 @@ namespace RSMGR _RequesterCharInvited = value; } - // + // bool getRequesterCharKicked() const { return _RequesterCharKicked; @@ -4903,7 +4912,7 @@ namespace RSMGR _RequesterCharKicked = value; } - // + // const std::string &getOwnerName() const { return _OwnerName; @@ -4921,9 +4930,9 @@ namespace RSMGR _OwnerName = value; - + } - // + // const std::string &getTitle() const { return _Title; @@ -4941,9 +4950,9 @@ namespace RSMGR _Title = value; - + } - // + // const std::string &getDescription() const { return _Description; @@ -4961,9 +4970,9 @@ namespace RSMGR _Description = value; - + } - // + // TAnimMode getAnimMode() const { return _AnimMode; @@ -4975,7 +4984,7 @@ namespace RSMGR _AnimMode = value; } - // + // R2::TSessionLevel getSessionLevel() const { return _SessionLevel; @@ -4987,7 +4996,7 @@ namespace RSMGR _SessionLevel = value; } - // + // bool getAllowFreeTrial() const { return _AllowFreeTrial; @@ -4999,7 +5008,7 @@ namespace RSMGR _AllowFreeTrial = value; } - // + // uint32 getLaunchDate() const { return _LaunchDate; @@ -5011,7 +5020,7 @@ namespace RSMGR _LaunchDate = value; } - // + // uint32 getNbConnectedPlayer() const { return _NbConnectedPlayer; @@ -5023,7 +5032,7 @@ namespace RSMGR _NbConnectedPlayer = value; } - // + // const std::string &getLanguage() const { return _Language; @@ -5041,9 +5050,9 @@ namespace RSMGR _Language = value; - + } - // + // TSessionOrientation getOrientation() const { return _Orientation; @@ -5055,7 +5064,7 @@ namespace RSMGR _Orientation = value; } - // + // uint32 getNbRating() const { return _NbRating; @@ -5067,7 +5076,7 @@ namespace RSMGR _NbRating = value; } - // + // uint32 getRateFun() const { return _RateFun; @@ -5079,7 +5088,7 @@ namespace RSMGR _RateFun = value; } - // + // uint32 getRateDifficulty() const { return _RateDifficulty; @@ -5091,7 +5100,7 @@ namespace RSMGR _RateDifficulty = value; } - // + // uint32 getRateAccessibility() const { return _RateAccessibility; @@ -5103,7 +5112,7 @@ namespace RSMGR _RateAccessibility = value; } - // + // uint32 getRateOriginality() const { return _RateOriginality; @@ -5115,7 +5124,7 @@ namespace RSMGR _RateOriginality = value; } - // + // uint32 getRateDirection() const { return _RateDirection; @@ -5127,7 +5136,7 @@ namespace RSMGR _RateDirection = value; } - // + // uint32 getScenarioRRPTotal() const { return _ScenarioRRPTotal; @@ -5139,7 +5148,7 @@ namespace RSMGR _ScenarioRRPTotal = value; } - + bool operator == (const TSessionDesc &other) const { return _SessionId == other._SessionId @@ -5195,10 +5204,10 @@ namespace RSMGR s.serial(_ScenarioRRPTotal); } - + private: - + }; @@ -5209,30 +5218,30 @@ namespace RSMGR class TCharDesc { protected: - // + // uint32 _CharId; - // + // bool _Connected; - // + // bool _Kicked; - // + // std::string _CharName; - // + // std::string _GuildName; - // + // uint32 _ShardId; - // + // R2::TSessionLevel _Level; - // + // CHARSYNC::TRace _Race; - // + // CHARSYNC::TCivilisation _Civilisation; - // + // CHARSYNC::TCult _Cult; - // + // TSessionPartStatus _PartStatus; public: - // + // uint32 getCharId() const { return _CharId; @@ -5244,7 +5253,7 @@ namespace RSMGR _CharId = value; } - // + // bool getConnected() const { return _Connected; @@ -5256,7 +5265,7 @@ namespace RSMGR _Connected = value; } - // + // bool getKicked() const { return _Kicked; @@ -5268,7 +5277,7 @@ namespace RSMGR _Kicked = value; } - // + // const std::string &getCharName() const { return _CharName; @@ -5286,9 +5295,9 @@ namespace RSMGR _CharName = value; - + } - // + // const std::string &getGuildName() const { return _GuildName; @@ -5306,9 +5315,9 @@ namespace RSMGR _GuildName = value; - + } - // + // uint32 getShardId() const { return _ShardId; @@ -5320,7 +5329,7 @@ namespace RSMGR _ShardId = value; } - // + // R2::TSessionLevel getLevel() const { return _Level; @@ -5332,7 +5341,7 @@ namespace RSMGR _Level = value; } - // + // CHARSYNC::TRace getRace() const { return _Race; @@ -5344,7 +5353,7 @@ namespace RSMGR _Race = value; } - // + // CHARSYNC::TCivilisation getCivilisation() const { return _Civilisation; @@ -5356,7 +5365,7 @@ namespace RSMGR _Civilisation = value; } - // + // CHARSYNC::TCult getCult() const { return _Cult; @@ -5368,7 +5377,7 @@ namespace RSMGR _Cult = value; } - // + // TSessionPartStatus getPartStatus() const { return _PartStatus; @@ -5380,7 +5389,7 @@ namespace RSMGR _PartStatus = value; } - + bool operator == (const TCharDesc &other) const { return _CharId == other._CharId @@ -5418,10 +5427,10 @@ namespace RSMGR s.serial(_PartStatus); } - + private: - + }; @@ -5931,13 +5940,13 @@ namespace RSMGR // The invited char id is deducted from the name by using. // the full name rules for shard resolution. // Return invoke_result with the following error codes : - // 0 : no error - // 100 : unknown onwer char - // 101 : player already invited - // 102 : no current session - // 103 : internal error - // 104 : invited char not found - // plus all the error code from inviteCharacter in the ring session manager interface + // 0 : no error + // 100 : unknown onwer char + // 101 : player already invited + // 102 : no current session + // 103 : internal error + // 104 : invited char not found + // plus all the error code from inviteCharacter in the ring session manager interface virtual void on_inviteCharacterByName(NLNET::TSockId from, uint32 charId, std::string invitedCharName) =0; // Ask for character existing rating for the current session scenario @@ -6132,13 +6141,13 @@ namespace RSMGR // The invited char id is deducted from the name by using. // the full name rules for shard resolution. // Return invoke_result with the following error codes : - // 0 : no error - // 100 : unknown onwer char - // 101 : player already invited - // 102 : no current session - // 103 : internal error - // 104 : invited char not found - // plus all the error code from inviteCharacter in the ring session manager interface + // 0 : no error + // 100 : unknown onwer char + // 101 : player already invited + // 102 : no current session + // 103 : internal error + // 104 : invited char not found + // plus all the error code from inviteCharacter in the ring session manager interface void inviteCharacterByName(uint32 charId, std::string invitedCharName) { @@ -6465,5 +6474,5 @@ namespace RSMGR }; } - + #endif diff --git a/code/ryzom/common/src/game_share/ring_session_manager_itf.xml b/code/ryzom/common/src/game_share/ring_session_manager_itf.xml index 7fc670080..a1294f0e1 100644 --- a/code/ryzom/common/src/game_share/ring_session_manager_itf.xml +++ b/code/ryzom/common/src/game_share/ring_session_manager_itf.xml @@ -1,10 +1,10 @@ - - + + - + diff --git a/code/ryzom/server/src/shard_unifier_service/database_mapping.cpp b/code/ryzom/server/src/shard_unifier_service/database_mapping.cpp index 0e5ba5489..336b50f7f 100644 --- a/code/ryzom/server/src/shard_unifier_service/database_mapping.cpp +++ b/code/ryzom/server/src/shard_unifier_service/database_mapping.cpp @@ -1,3 +1,4 @@ + // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // @@ -99,7 +100,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CKnownUserPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -107,7 +108,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_RelationId != NOPE::INVALID_OBJECT_ID + if (_RelationId != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -478,7 +479,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -578,7 +579,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -638,7 +639,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -756,7 +757,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CSessionParticipantPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -764,7 +765,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -1131,7 +1132,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -1230,7 +1231,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -1288,7 +1289,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -1412,7 +1413,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CCharacterPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -1420,7 +1421,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_CharId != NOPE::INVALID_OBJECT_ID + if (_CharId != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -1873,7 +1874,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -1992,7 +1993,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -2082,7 +2083,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -2167,7 +2168,7 @@ namespace RSMGR // allocate the container _Sessions = new std::vector < CSessionPtr >; - + // load the childs ret &= CSession::loadChildrenOfCCharacter(connection, getObjectId(), *_Sessions, filename, lineNum); return ret; @@ -2186,7 +2187,7 @@ namespace RSMGR nlassert(index < _Sessions->size()); return const_cast< CSessionPtr & >(_Sessions->operator[](index)); } - + CSessionPtr &CCharacter::getSessionsById(uint32 id) const { nlassert(_Sessions != NULL); @@ -2218,7 +2219,7 @@ namespace RSMGR // allocate the container _SessionParticipants = new std::vector < CSessionParticipantPtr >; - + // load the childs ret &= CSessionParticipant::loadChildrenOfCCharacter(connection, getObjectId(), *_SessionParticipants, filename, lineNum); return ret; @@ -2237,7 +2238,7 @@ namespace RSMGR nlassert(index < _SessionParticipants->size()); return const_cast< CSessionParticipantPtr & >(_SessionParticipants->operator[](index)); } - + CSessionParticipantPtr &CCharacter::getSessionParticipantsById(uint32 id) const { nlassert(_SessionParticipants != NULL); @@ -2269,7 +2270,7 @@ namespace RSMGR // allocate the container _KnownBy = new std::vector < CKnownUserPtr >; - + // load the childs ret &= CKnownUser::loadChildrenOfCCharacter(connection, getObjectId(), *_KnownBy, filename, lineNum); return ret; @@ -2288,7 +2289,7 @@ namespace RSMGR nlassert(index < _KnownBy->size()); return const_cast< CKnownUserPtr & >(_KnownBy->operator[](index)); } - + CKnownUserPtr &CCharacter::getKnownByById(uint32 id) const { nlassert(_KnownBy != NULL); @@ -2320,7 +2321,7 @@ namespace RSMGR // allocate the container _PlayerRatings = new std::vector < CPlayerRatingPtr >; - + // load the childs ret &= CPlayerRating::loadChildrenOfCCharacter(connection, getObjectId(), *_PlayerRatings, filename, lineNum); return ret; @@ -2339,7 +2340,7 @@ namespace RSMGR nlassert(index < _PlayerRatings->size()); return const_cast< CPlayerRatingPtr & >(_PlayerRatings->operator[](index)); } - + CPlayerRatingPtr &CCharacter::getPlayerRatingsById(uint32 id) const { nlassert(_PlayerRatings != NULL); @@ -2442,7 +2443,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CRingUserPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -2450,7 +2451,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_UserId != NOPE::INVALID_OBJECT_ID + if (_UserId != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -2638,7 +2639,7 @@ namespace RSMGR { // cascading deletion for single child GMStatus nlassert(loadGMStatus(connection, __FILE__, __LINE__)); - + if (getGMStatus() != NULL) getGMStatus()->remove(connection); } @@ -2863,7 +2864,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -2982,7 +2983,7 @@ namespace RSMGR // allocate the container _KnownUsers = new std::vector < CKnownUserPtr >; - + // load the childs ret &= CKnownUser::loadChildrenOfCRingUser(connection, getObjectId(), *_KnownUsers, filename, lineNum); return ret; @@ -3001,7 +3002,7 @@ namespace RSMGR nlassert(index < _KnownUsers->size()); return const_cast< CKnownUserPtr & >(_KnownUsers->operator[](index)); } - + CKnownUserPtr &CRingUser::getKnownUsersById(uint32 id) const { nlassert(_KnownUsers != NULL); @@ -3033,7 +3034,7 @@ namespace RSMGR // allocate the container _Characters = new std::map < uint32, CCharacterPtr >; - + // load the childs ret &= CCharacter::loadChildrenOfCRingUser(connection, getObjectId(), *_Characters, filename, lineNum); return ret; @@ -3073,7 +3074,7 @@ namespace RSMGR // allocate the container _Folders = new std::vector < CFolderPtr >; - + // load the childs ret &= CFolder::loadChildrenOfCRingUser(connection, getObjectId(), *_Folders, filename, lineNum); return ret; @@ -3092,7 +3093,7 @@ namespace RSMGR nlassert(index < _Folders->size()); return const_cast< CFolderPtr & >(_Folders->operator[](index)); } - + CFolderPtr &CRingUser::getFoldersById(uint32 id) const { nlassert(_Folders != NULL); @@ -3124,7 +3125,7 @@ namespace RSMGR // allocate the container _FolderAccess = new std::vector < CFolderAccessPtr >; - + // load the childs ret &= CFolderAccess::loadChildrenOfCRingUser(connection, getObjectId(), *_FolderAccess, filename, lineNum); return ret; @@ -3143,7 +3144,7 @@ namespace RSMGR nlassert(index < _FolderAccess->size()); return const_cast< CFolderAccessPtr & >(_FolderAccess->operator[](index)); } - + CFolderAccessPtr &CRingUser::getFolderAccessById(uint32 id) const { nlassert(_FolderAccess != NULL); @@ -3264,7 +3265,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CSessionPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -3272,7 +3273,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_SessionId != NOPE::INVALID_OBJECT_ID + if (_SessionId != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -3770,7 +3771,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -3940,7 +3941,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -4092,7 +4093,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -4239,7 +4240,7 @@ namespace RSMGR // allocate the container _SessionParticipants = new std::vector < CSessionParticipantPtr >; - + // load the childs ret &= CSessionParticipant::loadChildrenOfCSession(connection, getObjectId(), *_SessionParticipants, filename, lineNum); return ret; @@ -4258,7 +4259,7 @@ namespace RSMGR nlassert(index < _SessionParticipants->size()); return const_cast< CSessionParticipantPtr & >(_SessionParticipants->operator[](index)); } - + CSessionParticipantPtr &CSession::getSessionParticipantsById(uint32 id) const { nlassert(_SessionParticipants != NULL); @@ -4290,7 +4291,7 @@ namespace RSMGR // allocate the container _GuildInvites = new std::vector < CGuildInvitePtr >; - + // load the childs ret &= CGuildInvite::loadChildrenOfCSession(connection, getObjectId(), *_GuildInvites, filename, lineNum); return ret; @@ -4309,7 +4310,7 @@ namespace RSMGR nlassert(index < _GuildInvites->size()); return const_cast< CGuildInvitePtr & >(_GuildInvites->operator[](index)); } - + CGuildInvitePtr &CSession::getGuildInvitesById(uint32 id) const { nlassert(_GuildInvites != NULL); @@ -4341,7 +4342,7 @@ namespace RSMGR // allocate the container _JournalEntries = new std::vector < CJournalEntryPtr >; - + // load the childs ret &= CJournalEntry::loadChildrenOfCSession(connection, getObjectId(), *_JournalEntries, filename, lineNum); return ret; @@ -4360,7 +4361,7 @@ namespace RSMGR nlassert(index < _JournalEntries->size()); return const_cast< CJournalEntryPtr & >(_JournalEntries->operator[](index)); } - + CJournalEntryPtr &CSession::getJournalEntriesById(uint32 id) const { nlassert(_JournalEntries != NULL); @@ -4457,7 +4458,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CShardPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -4465,7 +4466,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_ShardId != NOPE::INVALID_OBJECT_ID + if (_ShardId != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -4777,7 +4778,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -4870,7 +4871,7 @@ namespace RSMGR // allocate the container _Guilds = new std::map < uint32, CGuildPtr >; - + // load the childs ret &= CGuild::loadChildrenOfCShard(connection, getObjectId(), *_Guilds, filename, lineNum); return ret; @@ -4977,7 +4978,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CGuildPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -4985,7 +4986,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_GuildId != NOPE::INVALID_OBJECT_ID + if (_GuildId != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -5342,7 +5343,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -5435,7 +5436,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -5480,7 +5481,7 @@ namespace RSMGR // allocate the container _Characters = new std::vector < CCharacterPtr >; - + // load the childs ret &= CCharacter::loadChildrenOfCGuild(connection, getObjectId(), *_Characters, filename, lineNum); return ret; @@ -5499,7 +5500,7 @@ namespace RSMGR nlassert(index < _Characters->size()); return const_cast< CCharacterPtr & >(_Characters->operator[](index)); } - + CCharacterPtr &CGuild::getCharactersById(uint32 id) const { nlassert(_Characters != NULL); @@ -5531,7 +5532,7 @@ namespace RSMGR // allocate the container _Invites = new std::vector < CGuildInvitePtr >; - + // load the childs ret &= CGuildInvite::loadChildrenOfCGuild(connection, getObjectId(), *_Invites, filename, lineNum); return ret; @@ -5550,7 +5551,7 @@ namespace RSMGR nlassert(index < _Invites->size()); return const_cast< CGuildInvitePtr & >(_Invites->operator[](index)); } - + CGuildInvitePtr &CGuild::getInvitesById(uint32 id) const { nlassert(_Invites != NULL); @@ -5645,7 +5646,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CGuildInvitePtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -5653,7 +5654,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -6012,7 +6013,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -6105,7 +6106,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -6155,7 +6156,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -6263,7 +6264,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CPlayerRatingPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -6271,7 +6272,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -6650,7 +6651,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -6748,7 +6749,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -6808,7 +6809,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -6926,7 +6927,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CJournalEntryPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -6934,7 +6935,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -7278,7 +7279,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -7378,7 +7379,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -7500,7 +7501,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CFolderPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -7508,7 +7509,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -7871,7 +7872,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -7965,7 +7966,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -8012,7 +8013,7 @@ namespace RSMGR // allocate the container _FolderAccess = new std::vector < CFolderAccessPtr >; - + // load the childs ret &= CFolderAccess::loadChildrenOfCFolder(connection, getObjectId(), *_FolderAccess, filename, lineNum); return ret; @@ -8031,7 +8032,7 @@ namespace RSMGR nlassert(index < _FolderAccess->size()); return const_cast< CFolderAccessPtr & >(_FolderAccess->operator[](index)); } - + CFolderAccessPtr &CFolder::getFolderAccessById(uint32 id) const { nlassert(_FolderAccess != NULL); @@ -8063,7 +8064,7 @@ namespace RSMGR // allocate the container _Sessions = new std::vector < CSessionPtr >; - + // load the childs ret &= CSession::loadChildrenOfCFolder(connection, getObjectId(), *_Sessions, filename, lineNum); return ret; @@ -8082,7 +8083,7 @@ namespace RSMGR nlassert(index < _Sessions->size()); return const_cast< CSessionPtr & >(_Sessions->operator[](index)); } - + CSessionPtr &CFolder::getSessionsById(uint32 id) const { nlassert(_Sessions != NULL); @@ -8177,7 +8178,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CFolderAccessPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -8185,7 +8186,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -8544,7 +8545,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -8637,7 +8638,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -8687,7 +8688,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -8799,7 +8800,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CScenarioPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -8807,7 +8808,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -9170,7 +9171,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -9278,7 +9279,7 @@ namespace RSMGR // allocate the container _SessionLogs = new std::vector < CSessionLogPtr >; - + // load the childs ret &= CSessionLog::loadChildrenOfCScenario(connection, getObjectId(), *_SessionLogs, filename, lineNum); return ret; @@ -9297,7 +9298,7 @@ namespace RSMGR nlassert(index < _SessionLogs->size()); return const_cast< CSessionLogPtr & >(_SessionLogs->operator[](index)); } - + CSessionLogPtr &CScenario::getSessionLogsById(uint32 id) const { nlassert(_SessionLogs != NULL); @@ -9329,7 +9330,7 @@ namespace RSMGR // allocate the container _PlayerRatings = new std::vector < CPlayerRatingPtr >; - + // load the childs ret &= CPlayerRating::loadChildrenOfCScenario(connection, getObjectId(), *_PlayerRatings, filename, lineNum); return ret; @@ -9348,7 +9349,7 @@ namespace RSMGR nlassert(index < _PlayerRatings->size()); return const_cast< CPlayerRatingPtr & >(_PlayerRatings->operator[](index)); } - + CPlayerRatingPtr &CScenario::getPlayerRatingsById(uint32 id) const { nlassert(_PlayerRatings != NULL); @@ -9443,7 +9444,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CSessionLogPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -9451,7 +9452,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_Id != NOPE::INVALID_OBJECT_ID + if (_Id != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -9810,7 +9811,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -9909,7 +9910,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); for (uint i=0; igetNumRows(); ++i) { @@ -10029,7 +10030,7 @@ namespace RSMGR { nlwarning("ERROR : someone try to delete this object, but there are still ptr on it !"); CGmStatusPtr *ptr = _PtrList; - do + do { nlwarning(" Pointer created from '%s', line %u", ptr->_FileName, ptr->_LineNum); ptr = _PtrList->getNextPtr(); @@ -10037,7 +10038,7 @@ namespace RSMGR nlstop; } // remove object from cache map - if (_UserId != NOPE::INVALID_OBJECT_ID + if (_UserId != NOPE::INVALID_OBJECT_ID && _ObjectState != NOPE::os_removed && _ObjectState != NOPE::os_transient) { @@ -10361,7 +10362,7 @@ namespace RSMGR if(_ObjectState == NOPE::os_released && state == NOPE::os_removed) { // a release object gets removed (e.g. by remove by id) - + // delete the object delete this; @@ -10453,7 +10454,7 @@ namespace RSMGR return false; } - CUniquePtr result(connection.storeResult()); + CUniquePtr result = connection.storeResult(); // check that the data description is consistent with database content nlassert(result->getNumRows() <= 1); @@ -10483,7 +10484,7 @@ namespace RSMGR childPtr = ret; return true; } - + // no result, but no error childPtr = CGmStatusPtr(); return true; diff --git a/code/ryzom/server/src/shard_unifier_service/database_mapping.h b/code/ryzom/server/src/shard_unifier_service/database_mapping.h index 4bba0916d..631447946 100644 --- a/code/ryzom/server/src/shard_unifier_service/database_mapping.h +++ b/code/ryzom/server/src/shard_unifier_service/database_mapping.h @@ -1,3 +1,4 @@ + // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // @@ -111,9 +112,9 @@ namespace RSMGR CKnownUserPtr() : _FileName(NULL), _LineNum(0), + _Ptr(NULL), _NextPtr(NULL), - _PrevPtr(NULL), - _Ptr(NULL) + _PrevPtr(NULL) { } @@ -148,7 +149,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -288,7 +289,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -428,7 +429,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -568,7 +569,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -708,7 +709,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -848,7 +849,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -988,7 +989,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -1091,9 +1092,9 @@ namespace RSMGR CGuildInvitePtr() : _FileName(NULL), _LineNum(0), + _Ptr(NULL), _NextPtr(NULL), - _PrevPtr(NULL), - _Ptr(NULL) + _PrevPtr(NULL) { } @@ -1128,7 +1129,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -1231,9 +1232,9 @@ namespace RSMGR CPlayerRatingPtr() : _FileName(NULL), _LineNum(0), + _Ptr(NULL), _NextPtr(NULL), - _PrevPtr(NULL), - _Ptr(NULL) + _PrevPtr(NULL) { } @@ -1268,7 +1269,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -1371,9 +1372,9 @@ namespace RSMGR CJournalEntryPtr() : _FileName(NULL), _LineNum(0), + _Ptr(NULL), _NextPtr(NULL), - _PrevPtr(NULL), - _Ptr(NULL) + _PrevPtr(NULL) { } @@ -1408,7 +1409,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -1548,7 +1549,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -1688,7 +1689,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -1828,7 +1829,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -1968,7 +1969,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -2108,7 +2109,7 @@ namespace RSMGR _PrevPtr(NULL) { _Ptr = objectPtr; - + linkPtr(); } @@ -2201,7 +2202,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 2 }; @@ -2230,10 +2231,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(ut_character) NL_STRING_CONVERSION_TABLE_ENTRY(ut_pioneer) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -2335,7 +2337,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 3 }; @@ -2366,10 +2368,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(rt_banned) NL_STRING_CONVERSION_TABLE_ENTRY(rt_friend_dm) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -2686,7 +2689,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CKnownUserPtr *_PtrList; + CKnownUserPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CKnownUser *loadFromCache(uint32 objectId, bool unrelease); @@ -2713,7 +2716,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -2961,7 +2964,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CSessionParticipantPtr *_PtrList; + CSessionParticipantPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CSessionParticipant *loadFromCache(uint32 objectId, bool unrelease); @@ -2988,7 +2991,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -3612,7 +3615,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CCharacterPtr *_PtrList; + CCharacterPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CCharacter *loadFromCache(uint32 objectId, bool unrelease); @@ -3639,7 +3642,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -3696,7 +3699,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 4 }; @@ -3729,10 +3732,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(ca_edit) NL_STRING_CONVERSION_TABLE_ENTRY(ca_anim) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -3834,7 +3838,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 3 }; @@ -3865,10 +3869,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(cs_logged) NL_STRING_CONVERSION_TABLE_ENTRY(cs_online) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -3969,7 +3974,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 2 }; @@ -3998,10 +4003,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(ul_none) NL_STRING_CONVERSION_TABLE_ENTRY(ul_public) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -4102,7 +4108,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 2 }; @@ -4131,10 +4137,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(at_normal) NL_STRING_CONVERSION_TABLE_ENTRY(at_gold) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -4237,7 +4244,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 4 }; @@ -4270,10 +4277,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(lang_de) NL_STRING_CONVERSION_TABLE_ENTRY(lang_other) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -4872,7 +4880,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CRingUserPtr *_PtrList; + CRingUserPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CRingUser *loadFromCache(uint32 objectId, bool unrelease); @@ -4899,7 +4907,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -4955,7 +4963,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 3 }; @@ -4986,10 +4994,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(rtp_variant) NL_STRING_CONVERSION_TABLE_ENTRY(rtp_different) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -5090,7 +5099,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 2 }; @@ -5119,10 +5128,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(pt_rp) NL_STRING_CONVERSION_TABLE_ENTRY(pt_pvp) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -5903,7 +5913,24 @@ namespace RSMGR _SessionId(NOPE::INVALID_OBJECT_ID) { // Default initialisation + _SessionType = TSessionType::st_edit; + _OwnerId = 0; + _PlanDate = 0; + _StartDate = 0; + _Orientation = TSessionOrientation::so_other; + _Level = R2::TSessionLevel::sl_a; + _RuleType = TRuleType::rt_strict; _AccessType = TAccessType::at_private; + _State = TSessionState::ss_planned; + _HostShardId = 0; + _SubscriptionSlots = 0; + _ReservedSlots = 0; + _EstimatedDuration = TEstimatedDuration::et_short; + _FinalDuration = 0; + _FolderId = 0; + _AnimMode = TAnimMode::am_dm; + _GuildFilter = TGuildFilter::gf_only_my_guild; + _SubscriptionClosed = 0; _Newcomer = 1; _SessionParticipants = NULL; _GuildInvites = NULL; @@ -6010,7 +6037,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CSessionPtr *_PtrList; + CSessionPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CSession *loadFromCache(uint32 objectId, bool unrelease); @@ -6037,7 +6064,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -6095,7 +6122,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 4 }; @@ -6128,10 +6155,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(ds_restricted) NL_STRING_CONVERSION_TABLE_ENTRY(ds_open) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -6418,7 +6446,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CShardPtr *_PtrList; + CShardPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CShard *loadFromCache(uint32 objectId, bool unrelease); @@ -6445,7 +6473,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -6692,7 +6720,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CGuildPtr *_PtrList; + CGuildPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CGuild *loadFromCache(uint32 objectId, bool unrelease); @@ -6719,7 +6747,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -6920,7 +6948,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CGuildInvitePtr *_PtrList; + CGuildInvitePtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CGuildInvite *loadFromCache(uint32 objectId, bool unrelease); @@ -6947,7 +6975,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -7259,7 +7287,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CPlayerRatingPtr *_PtrList; + CPlayerRatingPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CPlayerRating *loadFromCache(uint32 objectId, bool unrelease); @@ -7286,7 +7314,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -7342,7 +7370,7 @@ namespace RSMGR end_of_enum, invalid_val, - + /// Number of enumerated values nb_enum_items = 2 }; @@ -7371,10 +7399,11 @@ namespace RSMGR NL_STRING_CONVERSION_TABLE_ENTRY(jet_credits) NL_STRING_CONVERSION_TABLE_ENTRY(jet_notes) NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val) - }; - static NLMISC::CStringConversion - conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) - / sizeof(TValues_nl_string_conversion_table[0]), invalid_val); + }; + static NLMISC::CStringConversion + conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table) + / sizeof(TValues_nl_string_conversion_table[0]), + invalid_val); return conversionTable; } @@ -7685,7 +7714,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CJournalEntryPtr *_PtrList; + CJournalEntryPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CJournalEntry *loadFromCache(uint32 objectId, bool unrelease); @@ -7712,7 +7741,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -7986,7 +8015,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CFolderPtr *_PtrList; + CFolderPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CFolder *loadFromCache(uint32 objectId, bool unrelease); @@ -8013,7 +8042,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -8215,7 +8244,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CFolderAccessPtr *_PtrList; + CFolderAccessPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CFolderAccess *loadFromCache(uint32 objectId, bool unrelease); @@ -8242,7 +8271,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -8679,7 +8708,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CScenarioPtr *_PtrList; + CScenarioPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CScenario *loadFromCache(uint32 objectId, bool unrelease); @@ -8706,7 +8735,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -9050,7 +9079,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CSessionLogPtr *_PtrList; + CSessionLogPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CSessionLog *loadFromCache(uint32 objectId, bool unrelease); @@ -9077,7 +9106,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) @@ -9252,7 +9281,7 @@ namespace RSMGR time_t _ReleaseDate; /// The linked list of pointer on this object - CGmStatusPtr *_PtrList; + CGmStatusPtr *_PtrList; // Try to load the specified object from the memory cache, return NULL if the object is not in the cache static CGmStatus *loadFromCache(uint32 objectId, bool unrelease); @@ -9279,7 +9308,7 @@ namespace RSMGR } public: - + /** Return the object identifier (witch is unique) * You can only call this method on a persistent instance. * (because transient instance can have invalid id) diff --git a/code/ryzom/server/src/shard_unifier_service/database_mapping.xml b/code/ryzom/server/src/shard_unifier_service/database_mapping.xml index 84c2e2566..7512b899a 100644 --- a/code/ryzom/server/src/shard_unifier_service/database_mapping.xml +++ b/code/ryzom/server/src/shard_unifier_service/database_mapping.xml @@ -173,33 +173,33 @@ - + - - - + + + - - - + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + +