shareddata.cpp
来自「3D仿真组实物机器人环境下的机器人模型的设计工具。可以查看和修改现有模型的详细参」· C++ 代码 · 共 84 行
CPP
84 行
/*********************************************************************************** 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 + =
减小字号Ctrl + -
显示快捷键?