Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391
Modified Files:
dbdriver.cpp guilds.cpp party.cpp wolfpack.vcproj
Log Message:
New documentation.
Index: wolfpack.vcproj
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** wolfpack.vcproj 23 May 2004 11:26:28 -0000 1.33
--- wolfpack.vcproj 2 Jul 2004 13:35:36 -0000 1.34
***************
*** 107,111 ****
<Tool
Name="VCLinkerTool"
! AdditionalDependencies="qt-mt322.lib ws2_32.lib comctl32.lib msvcrt.lib python23.lib wininet.lib imagehlp.lib"
OutputFile="../wolfpack.exe"
LinkIncremental="1"
--- 107,111 ----
<Tool
Name="VCLinkerTool"
! AdditionalDependencies="qt-mt331.lib ws2_32.lib comctl32.lib msvcrt.lib python23.lib wininet.lib imagehlp.lib"
OutputFile="../wolfpack.exe"
LinkIncremental="1"
Index: dbdriver.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbdriver.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** dbdriver.cpp 19 Jun 2004 02:06:51 -0000 1.36
--- dbdriver.cpp 2 Jul 2004 13:35:36 -0000 1.37
***************
*** 183,186 ****
--- 183,190 ----
static PyObject* wpDbResult_getAttr( wpDbResult* self, char* name );
+ /*
+ \object dbresult
+ \description This object type represents the response from the database to a query.
+ */
PyTypeObject wpDbResultType =
{
***************
*** 189,192 ****
--- 193,201 ----
};
+ /*
+ \method dbresult.free
+ \description This function frees the resources allocated by this dbresult object. Always call this
+ when you no longer need this object.
+ */
static PyObject* wpDbResult_free( wpDbResult* self, PyObject* args )
{
***************
*** 197,200 ****
--- 206,214 ----
}
+ /*
+ \method dbresult.fetchrow
+ \return A boolean value.
+ \description Fetch a new row from the database and return false if the end of the result set was reached.
+ */
static PyObject* wpDbResult_fetchrow( wpDbResult* self, PyObject* args )
{
***************
*** 208,211 ****
--- 222,233 ----
}
+ /*
+ \method dbresult.getint
+ \param position The position of the integer value you want to get.
+ \return An integer value.
+ \description Get an integer value from the row at the given position.
+ Please be careful with this function. If you specify an invalid position
+ it can lead to a crash of your server.
+ */
static PyObject* wpDbResult_getint( wpDbResult* self, PyObject* args )
{
***************
*** 218,221 ****
--- 240,251 ----
}
+ /*
+ \method dbresult.getstring
+ \param position The position of the string value you want to get.
+ \return A string value.
+ \description Get a string value from the row at the given position.
+ Please be careful with this function. If you specify an invalid position
+ it can lead to a crash of your server.
+ */
static PyObject* wpDbResult_getstring( wpDbResult* self, PyObject* args )
{
Index: guilds.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/guilds.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** guilds.cpp 2 Jun 2004 15:04:05 -0000 1.14
--- guilds.cpp 2 Jul 2004 13:35:36 -0000 1.15
***************
*** 358,363 ****
static int wpGuild_compare( PyObject* a, PyObject* b );
! /*!
! The python type object for the guild type.
*/
PyTypeObject wpGuildType =
--- 358,364 ----
static int wpGuild_compare( PyObject* a, PyObject* b );
! /*
! \object guild
! \description This object type represents a guild.
*/
PyTypeObject wpGuildType =
***************
*** 375,378 ****
--- 376,385 ----
}
+ /*
+ \method guild.addmember
+ \param player A <object id="char">char</object> object for a player.
+ \return False if a npc was passed, True otherwise.
+ \description This method adds a member to this guild.
+ */
PyObject* wpGuild_addmember( wpGuild* self, PyObject* args )
{
***************
*** 394,397 ****
--- 401,410 ----
}
+ /*
+ \method guild.removemember
+ \param player A <object id="char">char</object> object for a player.
+ \return False if a npc was passed, True otherwise.
+ \description This method removes a member from this guild.
+ */
PyObject* wpGuild_removemember( wpGuild* self, PyObject* args )
{
***************
*** 413,416 ****
--- 426,435 ----
}
+ /*
+ \method guild.addcanidate
+ \param player A <object id="char">char</object> object for a player.
+ \return False if a npc was passed, True otherwise.
+ \description This method adds a canidate to this guild.
+ */
PyObject* wpGuild_addcanidate( wpGuild* self, PyObject* args )
{
***************
*** 432,435 ****
--- 451,460 ----
}
+ /*
+ \method guild.removecanidate
+ \param player A <object id="char">char</object> object for a player.
+ \return False if a npc was passed, True otherwise.
+ \description This method removes a canidate from this guild.
+ */
PyObject* wpGuild_removecanidate( wpGuild* self, PyObject* args )
{
***************
*** 451,454 ****
--- 476,489 ----
}
+ /*
+ \method guild.setmemberinfo
+ \param player A <object id="char">char</object> object for a player.
+ \param info A dictionary with represents the member information for the given player in this guilds.
+ The following keys are valid:
+ - <code>showsign</code> Set this item to True if the guild abbreviation should be appended to the players name.
+ - <code>guildtitle</code> If this item is not None, it will be shown as this members title within the guild.
+ - <code>joined</code> This is a UNIX timestamp representing the time and date when this member joined the guild.
+ \description This method changes the member information structure for a member of this guild.
+ */
PyObject* wpGuild_setmemberinfo( wpGuild* self, PyObject* args )
{
***************
*** 508,511 ****
--- 543,556 ----
}
+ /*
+ \method guild.getmemberinfo
+ \param player A <object id="char">char</object> object for a player.
+ \return A dictionary with data from the member information structure for the given player in this guilds.
+ The following keys are valid:
+ - <code>showsign</code> This item is True if the guilds abbreviation is appended to this players name.
+ - <code>guildtitle</code> This item is the players title within the guild. It is a unicode string.
+ - <code>joined</code> This is a UNIX timestamp representing the time and date when this member joined the guild.
+ \description This method retrieves the memebr information structure for a member of this guild.
+ */
PyObject* wpGuild_getmemberinfo( wpGuild* self, PyObject* args )
{
***************
*** 542,545 ****
--- 587,594 ----
}
+ /*
+ \method guild.delete
+ \description Delete this guild.
+ */
PyObject* wpGuild_delete( wpGuild* self, PyObject* args )
{
***************
*** 564,567 ****
--- 613,619 ----
}
+ /*
+ \rproperty guild.members This property is a list of <object id="char">char</object> objects for every member of the guild.
+ */
if ( !strcmp( name, "members" ) )
{
***************
*** 577,580 ****
--- 629,635 ----
return list;
}
+ /*
+ \rproperty guild.canidates This property is a list of <object id="char">char</object> objects for every canidate of the guild.
+ */
else if ( !strcmp( name, "canidates" ) )
{
***************
*** 590,593 ****
--- 645,652 ----
return list;
}
+ /*
+ \property guild.leader This property is a <object id="char">char</object> object for the leader of the guild. This can also be None if there
+ is no leader.
+ */
else if ( !strcmp( name, "leader" ) )
{
***************
*** 602,605 ****
--- 661,667 ----
}
}
+ /*
+ \property guild.name This is the name of this guild.
+ */
else if ( !strcmp( name, "name" ) )
{
***************
*** 614,617 ****
--- 676,682 ----
}
}
+ /*
+ \property guild.abbreviation This is the abbreviation of this guilds name.
+ */
else if ( !strcmp( name, "abbreviation" ) )
{
***************
*** 626,629 ****
--- 691,697 ----
}
}
+ /*
+ \property guild.charta This is the charta of this guild.
+ */
else if ( !strcmp( name, "charta" ) )
{
***************
*** 638,641 ****
--- 706,712 ----
}
}
+ /*
+ \property guild.website This is the URL of the website for this guild.
+ */
else if ( !strcmp( name, "website" ) )
{
***************
*** 650,665 ****
--- 721,752 ----
}
}
+ /*
+ \property guild.alignment This integer value indicates the alignment of the guild.
+ <code>0: Neutral
+ 1: Evil
+ 2: Good</code>
+ */
else if ( !strcmp( name, "alignment" ) )
{
return PyInt_FromLong( self->guild->alignment() );
}
+ /*
+ \property guild.serial This is the unique integer id for this guild. It can be used to
+ retrieve a guild object by using the wolfpack.findguild function.
+ */
else if ( !strcmp( name, "serial" ) )
{
return PyInt_FromLong( self->guild->serial() );
}
+ /*
+ \property guild.founded This property is a UNIX timestamp indicating when this guild was founded.
+ */
else if ( !strcmp( name, "founded" ) )
{
return PyInt_FromLong( self->guild->founded().toTime_t() );
}
+ /*
+ \property guild.guildstone This is the main guildstone for this guild. It can be None if there is no main guildstone for this guild.
+ */
else if ( !strcmp( name, "guildstone" ) )
{
Index: party.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/party.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** party.cpp 15 Jun 2004 02:44:44 -0000 1.13
--- party.cpp 2 Jul 2004 13:35:36 -0000 1.14
***************
*** 437,442 ****
}
! /*!
! The python object structure for a party.
*/
struct wpParty
--- 437,443 ----
}
! /*
! \object party
! \description This object type represents a party.
*/
struct wpParty
***************
*** 467,470 ****
--- 468,478 ----
}
+ /*
+ \method party.tellsingle
+ \param source A <object id="char">char</object> object for the source of the message.
+ \param target A <object id="char">char</object> object for the target of the message.
+ \param message A string containing the message to be sent.
+ \description Send a single party member a partymessage from a given source.
+ */
static PyObject* wpParty_tellsingle( wpParty* self, PyObject* args )
{
***************
*** 482,486 ****
PyMem_Free( message );
! return PyTrue();
}
--- 490,495 ----
PyMem_Free( message );
! Py_INCREF(Py_None);
! return Py_None;
}
***************
*** 488,491 ****
--- 497,506 ----
}
+ /*
+ \method party.tellsingle
+ \param source A <object id="char">char</object> object for the source of the message.
+ \param message A string containing the message to be sent.
+ \description Send a message to all party members from a single source.
+ */
static PyObject* wpParty_tellall( wpParty* self, PyObject* args )
{
***************
*** 517,524 ****
--- 532,545 ----
cParty* party = self->party;
+ /*
+ \rproperty party.leader A <object id="char">char</object> object for the leader of this party.
+ */
if ( !strcmp( name, "leader" ) )
{
return party->leader()->getPyObject();
}
+ /*
+ \rproperty party.members A list of <object id="char">char</object> objects for the members in this party.
+ */
else if ( !strcmp( name, "members" ) )
{
***************
*** 529,532 ****
--- 550,556 ----
return list;
}
+ /*
+ \rproperty party.canidates A list of <object id="char">char</object> objects for the canidates in this party.
+ */
else if ( !strcmp( name, "canidates" ) )
{
***************
*** 537,540 ****
--- 561,567 ----
return list;
}
+ /*
+ \rproperty party.lootingallowed A list of <object id="char">char</object> objects for the members of this party who allowed looting their corpse.
+ */
else if ( !strcmp( name, "lootingallowed" ) )
{
|