Fix module bitsets and default session values

ryzomclassic-develop
kaetemi 5 years ago committed by Jan Boon
parent 55c3939789
commit ea021e1d96

@ -20,6 +20,22 @@
<!-- ######################################################### -->
<xsl:template match="generator">
<xsl:if test="$output != 'php'">
// Ryzom - MMORPG Framework &lt;http://dev.ryzom.com/projects/ryzom/&gt;
// 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 &lt;http://www.gnu.org/licenses/&gt;.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !
/////////////////////////////////////////////////////////////////
@ -632,7 +648,7 @@ namespace <xsl:value-of select="@name"/>
<xsl:call-template name="enumGen">
<xsl:with-param name="enumName" select="concat(@name, 'Enum')"/>
</xsl:call-template>
typedef NLMISC::CEnumBitset &lt; <xsl:value-of select="@name"/>Enum, uint32, <xsl:value-of select="@name"/>Enum::invalid_val, ',', NLMISC::TContainedEnum &lt; <xsl:value-of select="@name"/>Enum, uint32 &gt;, <xsl:value-of select="@name"/>Enum::TValues &gt; <xsl:value-of select="@name"/>;
typedef NLMISC::CEnumBitset &lt; <xsl:value-of select="@name"/>Enum, uint32, <xsl:value-of select="@name"/>Enum::max_val, ',', NLMISC::TContainedEnum &lt; <xsl:value-of select="@name"/>Enum, uint32 &gt;, <xsl:value-of select="@name"/>Enum::TValues &gt; <xsl:value-of select="@name"/>;
</xsl:if>
<xsl:if test="not(@bitset='true')">
<xsl:call-template name="enumGen">
@ -668,7 +684,13 @@ namespace <xsl:value-of select="@name"/>
end_of_enum,
</xsl:if>
<!-- generate an invalid and undefined value-->
<xsl:if test="@bitset='true'">
empty_val = 0,
max_val = ((uint32)<xsl:value-of select="item[last()]/@name"/> &lt;&lt; 1) - 1,
</xsl:if>
<xsl:if test="not(@bitset='true')">
invalid_val,
</xsl:if>
<!-- generate a count of node -->
/// Number of enumerated values
nb_enum_items = <xsl:value-of select="count(item)"/>
@ -697,12 +719,16 @@ namespace <xsl:value-of select="@name"/>
{
NL_BEGIN_STRING_CONVERSION_TABLE(TValues)
<xsl:for-each select="item"> NL_STRING_CONVERSION_TABLE_ENTRY(<xsl:value-of select="@name"/>)
</xsl:for-each> NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val)
};
</xsl:for-each>
<xsl:if test="not(@bitset='true')"> NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val)
</xsl:if> };
static NLMISC::CStringConversion&lt;TValues&gt;
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]),
<xsl:if test="@bitset='true'"> empty_val);
</xsl:if>
<xsl:if test="not(@bitset='true')"> invalid_val);
</xsl:if>
return conversionTable;
}
@ -710,8 +736,10 @@ namespace <xsl:value-of select="@name"/>
public:
<xsl:value-of select="$enumName"/>()
: _Value(invalid_val)
{
<xsl:if test="@bitset='true'"> : _Value(empty_val)
</xsl:if>
<xsl:if test="not(@bitset='true')"> : _Value(invalid_val)
</xsl:if> {
}
<xsl:value-of select="$enumName"/>(TValues value)
: _Value(value)
@ -772,9 +800,9 @@ namespace <xsl:value-of select="@name"/>
// return true if the actual value of the enum is valid, otherwise false
bool isValid()
{
if (_Value == invalid_val)
<xsl:if test="not(@bitset='true')"> if (_Value == invalid_val)
return false;
</xsl:if>
// not invalid, check other enum value
return getConversionTable().isValid(_Value);
}
@ -1682,7 +1710,7 @@ namespace <xsl:value-of select="@name"/>
while (!childs.empty())
{
get<xsl:value-of select="@name"/>ByIndex(childs.size()-1)->remove(connection);
get<xsl:value-of select="@name"/>ByIndex((uint32)childs.size()-1)->remove(connection);
}
}
@ -1886,7 +1914,7 @@ namespace <xsl:value-of select="@name"/>
}
else if (cmd == NOPE::cc_instance_count)
{
return _ObjectCache.size();
return (uint32)_ObjectCache.size();
}
// default return value
@ -1904,7 +1932,7 @@ namespace <xsl:value-of select="@name"/>
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&lt;MSW::CStoreResult&gt; result = connection.storeResult();
CUniquePtr&lt;MSW::CStoreResult&gt; result = connection.storeResult();
for (uint i=0; i&lt;result->getNumRows(); ++i)
{
@ -2195,7 +2223,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification
return false;
}
std::auto_ptr&lt;MSW::CStoreResult&gt; result = connection.storeResult();
CUniquePtr&lt;MSW::CStoreResult&gt; result = connection.storeResult();
// check that the data description is consistent with database content
nlassert(result->getNumRows() &lt;= 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 <xsl:value-of select="@type"/>Ptr nil;
static <xsl:value-of select="@type"/>Ptr nilPtr;
return nil;
return nilPtr;
}
</xsl:when>
@ -2321,8 +2349,8 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification
if (it == _<xsl:value-of select="@name"/>->end())
{
// no object with this id, return a null pointer
static <xsl:value-of select="@type"/>Ptr nil;
return nil;
static <xsl:value-of select="@type"/>Ptr nilPtr;
return nilPtr;
}
return const_cast&lt; <xsl:value-of select="@type"/>Ptr &amp; &gt;(it->second);
@ -2383,7 +2411,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification
protected:
<xsl:if test="not(@extend)">
/// the callback server adaptor
std::auto_ptr&lt;ICallbackServerAdaptor&gt; _CallbackServer;
CUniquePtr&lt;ICallbackServerAdaptor&gt; _CallbackServer;
</xsl:if>
void getCallbakArray(NLNET::TCallbackItem *&amp;arrayPtr, uint32 &amp;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&lt;ICallbackServerAdaptor&gt;(new CNelCallbackServerAdaptor(this));
_CallbackServer = CUniquePtr&lt;ICallbackServerAdaptor&gt;(new CNelCallbackServerAdaptor(this));
}
else
{
// use the replacement one
_CallbackServer = std::auto_ptr&lt;ICallbackServerAdaptor&gt;(replacementAdaptor);
_CallbackServer = CUniquePtr&lt;ICallbackServerAdaptor&gt;(replacementAdaptor);
}
}
</xsl:if>
@ -2591,7 +2619,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification
protected:
<xsl:if test="not(@extend)">
/// the callback client adaptor
std::auto_ptr &lt; ICallbackClientAdaptor &gt; _CallbackClient;
CUniquePtr&lt;ICallbackClientAdaptor&gt; _CallbackClient;
</xsl:if>
void getCallbakArray(NLNET::TCallbackItem *&amp;arrayPtr, uint32 &amp;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 &lt; ICallbackClientAdaptor &gt;(new CNelCallbackClientAdaptor(this));
_CallbackClient = CUniquePtr&lt;ICallbackClientAdaptor&gt;(new CNelCallbackClientAdaptor(this));
}
else
{
// use the replacement one
_CallbackClient = std::auto_ptr &lt; ICallbackClientAdaptor &gt;(adaptorReplacement);
_CallbackClient = CUniquePtr&lt;ICallbackClientAdaptor&gt;(adaptorReplacement);
}
}
</xsl:if>

@ -1,3 +1,4 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// 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);

File diff suppressed because it is too large Load Diff

@ -1,10 +1,10 @@
<generator header_tag="RING_SESSION_MANAGER_ITF">
<include file="nel/misc/entity_id.h"/>
<include file="r2_share/r2_basic_types.h"/>
<include file="r2_share/r2_share_itf.h"/>
<include file="game_share/r2_basic_types.h"/>
<include file="game_share/r2_share_itf.h"/>
<include file="nel/net/login_cookie.h"/>
<include file="../../nelns/welcome_service/welcome_service_itf.h"/>
<include file="game_share/welcome_service_itf.h"/>
<include file="game_share/character_sync_itf.h"/>
<include file="game_share/security_check.h"/>
<cpp-include file="stdpch.h"/>

@ -1,3 +1,4 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// 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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++i)
{
@ -638,7 +639,7 @@ namespace RSMGR
return false;
}
CUniquePtr<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++i)
{
@ -1288,7 +1289,7 @@ namespace RSMGR
return false;
}
CUniquePtr<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++i)
{
@ -2082,7 +2083,7 @@ namespace RSMGR
return false;
}
CUniquePtr<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++i)
{
@ -4092,7 +4093,7 @@ namespace RSMGR
return false;
}
CUniquePtr<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++i)
{
@ -6155,7 +6156,7 @@ namespace RSMGR
return false;
}
CUniquePtr<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++i)
{
@ -6808,7 +6809,7 @@ namespace RSMGR
return false;
}
CUniquePtr<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++i)
{
@ -8687,7 +8688,7 @@ namespace RSMGR
return false;
}
CUniquePtr<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<MSW::CStoreResult> result(connection.storeResult());
CUniquePtr<MSW::CStoreResult> result = connection.storeResult();
for (uint i=0; i<result->getNumRows(); ++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<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);
@ -10483,7 +10484,7 @@ namespace RSMGR
childPtr = ret;
return true;
}
// no result, but no error
childPtr = CGmStatusPtr();
return true;

@ -1,3 +1,4 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// 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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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<TValues>
conversionTable(TValues_nl_string_conversion_table, sizeof(TValues_nl_string_conversion_table)
/ sizeof(TValues_nl_string_conversion_table[0]), 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);
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)

@ -173,33 +173,33 @@
<parent class="CFolder" child_name="Sessions" relation="one-to-many" db_col="folder_id" cont="vector"/>
<property type="TSessionId" name="SessionId" db_col="session_id" unique_id="true" autogen="true"/>
<property type="TSessionType" name="SessionType" db_col="session_type" enum="true"/>
<property type="TSessionType" name="SessionType" db_col="session_type" enum="true" default="TSessionType::st_edit"/>
<property type="std::string" name="Title" db_col="title" byref="true"/>
<property type="uint32" name="OwnerId" db_col="owner" />
<property type="uint32" name="PlanDate" db_col="plan_date" date="true"/>
<property type="uint32" name="StartDate" db_col="start_date" date="true"/>
<property type="uint32" name="OwnerId" db_col="owner" default="0"/>
<property type="uint32" name="PlanDate" db_col="plan_date" date="true" default="0"/>
<property type="uint32" name="StartDate" db_col="start_date" date="true" default="0"/>
<property type="std::string" name="Description" db_col="description" byref="true"/>
<property type="TSessionOrientation" name="Orientation" db_col="orientation" enum="true"/>
<property type="R2::TSessionLevel" name="Level" db_col="level" enum="true"/>
<property type="TRuleType" name="RuleType" db_col="rule_type" enum="true"/>
<property type="TSessionOrientation" name="Orientation" db_col="orientation" enum="true" default="TSessionOrientation::so_other"/>
<property type="R2::TSessionLevel" name="Level" db_col="level" enum="true" default="R2::TSessionLevel::sl_a"/>
<property type="TRuleType" name="RuleType" db_col="rule_type" enum="true" default="TRuleType::rt_strict"/>
<property type="TAccessType" name="AccessType" db_col="access_type" enum="true" default="TAccessType::at_private"/>
<property type="TSessionState" name="State" db_col="state" enum="true"/>
<property type="uint32" name="HostShardId" db_col="host_shard_id"/>
<property type="uint32" name="SubscriptionSlots" db_col="subscription_slots" />
<property type="uint32" name="ReservedSlots" db_col="reserved_slots" />
<property type="TEstimatedDuration" name="EstimatedDuration" db_col="estimated_duration" enum="true"/>
<property type="uint32" name="FinalDuration" db_col="final_duration" />
<property type="uint32" name="FolderId" db_col="folder_id" />
<property type="TSessionState" name="State" db_col="state" enum="true" default="TSessionState::ss_planned"/>
<property type="uint32" name="HostShardId" db_col="host_shard_id" default="0"/>
<property type="uint32" name="SubscriptionSlots" db_col="subscription_slots" default="0"/>
<property type="uint32" name="ReservedSlots" db_col="reserved_slots" default="0"/>
<property type="TEstimatedDuration" name="EstimatedDuration" db_col="estimated_duration" enum="true" default="TEstimatedDuration::et_short"/>
<property type="uint32" name="FinalDuration" db_col="final_duration" default="0"/>
<property type="uint32" name="FolderId" db_col="folder_id" default="0"/>
<property type="std::string" name="Lang" db_col="lang" byref="true"/>
<property type="std::string" name="Icone" db_col="icone" byref="true"/>
<property type="TAnimMode" name="AnimMode" db_col="anim_mode" enum="smart"/>
<property type="TRaceFilter" name="RaceFilter" db_col="race_filter" enum="smart"/>
<property type="TReligionFilter" name="ReligionFilter" db_col="religion_filter" enum="smart"/>
<property type="TGuildFilter" name="GuildFilter" db_col="guild_filter" enum="smart"/>
<property type="TShardFilter" name="ShardFilter" db_col="shard_filter" enum="smart"/>
<property type="TLevelFilter" name="LevelFilter" db_col="level_filter" enum="smart"/>
<property type="bool" name="SubscriptionClosed" db_col="subscription_closed" />
<property type="bool" name="Newcomer" db_col="newcomer" default="1"/>
<property type="TAnimMode" name="AnimMode" db_col="anim_mode" enum="smart" default="TAnimMode::am_dm"/>
<property type="TRaceFilter" name="RaceFilter" db_col="race_filter" enum="smart"/> <!-- FIXME -->
<property type="TReligionFilter" name="ReligionFilter" db_col="religion_filter" enum="smart"/> <!-- FIXME -->
<property type="TGuildFilter" name="GuildFilter" db_col="guild_filter" enum="smart" default="TGuildFilter::gf_only_my_guild"/>
<property type="TShardFilter" name="ShardFilter" db_col="shard_filter" enum="smart"/> <!-- FIXME -->
<property type="TLevelFilter" name="LevelFilter" db_col="level_filter" enum="smart"/> <!-- FIXME -->
<property type="bool" name="SubscriptionClosed" db_col="subscription_closed" default="0"/>
<property type="bool" name="Newcomer" db_col="newcomer" default="1"/>
<!-- <child_class type="CScenarioDesc" name="ScenarioDesc" relation="one-to-one" on-delete="cascade"/>-->
<child_class type="CSessionParticipant" name="SessionParticipants" relation="one-to-many" cont="vector" on-delete="cascade"/>

Loading…
Cancel
Save