📄 shareddata.cpp
字号:
/*********************************************************************************** In the name of Almighty ** ** SharedData.cpp : Robocup 3D Soccer Simulation Team Zigorat ** ** Date: 07/08/2007 ** Author: Mahdi Hamdarsi <hamdarsi@gmail.com> ** Comments: This file contains class definitions for serveral inter-thread ** communication tasks ** ***********************************************************************************//*! \file SharedData.cpp<pre><b>File:</b> SharedData.cpp<b>Project:</b> Robocup Soccer Simulation Team: Zigorat<b>Authors:</b> Mahdi Hamdarsi<b>Created:</b> 07/08/2007<b>Last Revision:</b> $ID$<b>Contents:</b> This file contains class definitions for serveral inter-thread communication tasks.<hr size=2><h2><b>Changes</b></h2><b>Date</b> <b>Author</b> <b>Comment</b>07/08/2007 Mahdi Initial version created</pre>*/#include "SharedData.h"#include "RubySceneGraph.h"#include "Parse.h"/********************************************************************************//********************************* Class TMutex *******************************//********************************************************************************//*! This is the constructor of TMutex. It initializes the mutex */TMutex::TMutex(){}/*! This method locks the mutex, if the mutex has been locked by antoher thread, this will block this thread until the other one unlocks it */void TMutex::lock(){ pthread_mutex_lock( &m_Mutex );}/*! This method unlocks the mutex | see above */void TMutex::unlock(){ pthread_mutex_unlock( &m_Mutex );}/********************************************************************************//********************************* Class TMutex *******************************//********************************************************************************//*! This is the constructor of the TMessage class. It clears the internals */TMessage::TMessage(){ clear();}/*! This method clears the TMessage internals */void TMessage::clear(){ m_Command = CMD_ILLEGAL; m_Name = ""; m_ParrentIndex = -1; m_Index = -1; m_Position = VecPosition( 0 ); m_Shape = SHAPE_ILLEGAL; m_Size = VecPosition( 0 ); m_Material = MAT_ILLEGAL;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -