public/extensions/IThreader.h
changeset 372 47f21574db6d
parent 325 66fa86233688
child 375 a31ff1b6ae46
     1.1 --- a/public/extensions/IThreader.h	Thu Jan 25 22:39:12 2007 +0000
     1.2 +++ b/public/extensions/IThreader.h	Fri Jan 26 01:55:06 2007 +0000
     1.3 @@ -1,6 +1,25 @@
     1.4 +/**
     1.5 + * ===============================================================
     1.6 + * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     1.7 + * ===============================================================
     1.8 + *
     1.9 + *  This file is part of the SourceMod/SourcePawn SDK.  This file may only be used 
    1.10 + * or modified under the Terms and Conditions of its License Agreement, which is found 
    1.11 + * in LICENSE.txt.  The Terms and Conditions for making SourceMod extensions/plugins 
    1.12 + * may change at any time.  To view the latest information, see:
    1.13 + *   http://www.sourcemod.net/license.php
    1.14 + *
    1.15 + * Version: $Id$
    1.16 + */
    1.17 +
    1.18  #ifndef _INCLUDE_SOURCEMOD_THREADER_H
    1.19  #define _INCLUDE_SOURCEMOD_THREADER_H
    1.20  
    1.21 +/**
    1.22 + * @file IThreader.h
    1.23 + * @brief Contains platform independent routines for threading.
    1.24 + */
    1.25 +
    1.26  #include <IShareSys.h>
    1.27  
    1.28  #define SMINTERFACE_THREADER_NAME		"IThreader"
    1.29 @@ -15,13 +34,14 @@
    1.30  	{
    1.31  		Thread_Default = 0,
    1.32  		/**
    1.33 -		 * Auto-release handle on finish
    1.34 +		 * @brief Auto-release handle on finish
    1.35 +		 *
    1.36  		 * You are not guaranteed the handle for this is valid after
    1.37  		 * calling MakeThread(), so never use it until OnTerminate is called.
    1.38  		 */
    1.39  		Thread_AutoRelease = 1,
    1.40  		/**
    1.41 -		 * Thread is created "suspended", meaning it is inactive until unpaused.
    1.42 +		 * @brief Thread is created "suspended", meaning it is inactive until unpaused.
    1.43  		 */
    1.44  		Thread_CreateSuspended = 2,
    1.45  	};
    1.46 @@ -53,13 +73,14 @@
    1.47  	 */
    1.48  	struct ThreadParams
    1.49  	{
    1.50 +		/** Constructor */
    1.51  		ThreadParams() : 
    1.52  			flags(Thread_Default), 
    1.53  			prio(ThreadPrio_Normal)
    1.54  		{
    1.55  		};
    1.56 -		ThreadFlags flags;
    1.57 -		ThreadPriority prio;
    1.58 +		ThreadFlags flags;		/**< Flags to set on the thread */
    1.59 +		ThreadPriority prio;	/**< Priority to set on the thread */
    1.60  	};
    1.61  
    1.62  	class IThreadCreator;
    1.63 @@ -70,6 +91,7 @@
    1.64  	class IThreadHandle
    1.65  	{
    1.66  	public:
    1.67 +		/** Virtual destructor */
    1.68  		virtual ~IThreadHandle() { };
    1.69  	public:
    1.70  		/**
    1.71 @@ -94,7 +116,7 @@
    1.72  		/**
    1.73  		 * @brief Returns the thread states.
    1.74  		 *
    1.75 -		 * @param ptparmas	Pointer to a ThreadParams buffer.
    1.76 +		 * @param ptparams	Pointer to a ThreadParams buffer.
    1.77  		 */
    1.78  		virtual void GetParams(ThreadParams *ptparams) =0;
    1.79  
    1.80 @@ -135,6 +157,7 @@
    1.81  	class IThread
    1.82  	{
    1.83  	public:
    1.84 +		/** Virtual destructor */
    1.85  		virtual ~IThread() { };
    1.86  	public:
    1.87  		/**
    1.88 @@ -145,8 +168,7 @@
    1.89  		virtual void RunThread(IThreadHandle *pHandle) =0;
    1.90  
    1.91  		/**
    1.92 -		 * @param Called when the thread terminates.
    1.93 -		 * Note: This occurs inside the thread as well.
    1.94 +		 * @brief Called when the thread terminates.  This occurs inside the thread as well.
    1.95  		 *
    1.96  		 * @param pHandle		Pointer to the thread's handle.
    1.97  		 * @param cancel		True if the thread did not finish, false otherwise.
    1.98 @@ -161,6 +183,7 @@
    1.99  	class IThreadCreator
   1.100  	{
   1.101  	public:
   1.102 +		/** Virtual Destructor */
   1.103  		virtual ~IThreadCreator() { };
   1.104  	public:
   1.105  		/**
   1.106 @@ -204,6 +227,7 @@
   1.107  	class IMutex
   1.108  	{
   1.109  	public:
   1.110 +		/** Virtual Destructor */
   1.111  		virtual ~IMutex() { };
   1.112  	public:
   1.113  		/**
   1.114 @@ -235,6 +259,7 @@
   1.115  	class IEventSignal
   1.116  	{
   1.117  	public:
   1.118 +		/** Virtual Destructor */
   1.119  		virtual ~IEventSignal() { };
   1.120  	public:
   1.121  		/**
   1.122 @@ -271,6 +296,7 @@
   1.123  	class IThreadWorker : public IThreadCreator
   1.124  	{
   1.125  	public:
   1.126 +		/** Virtual Destructor */
   1.127  		virtual ~IThreadWorker()
   1.128  		{
   1.129  		};