PCreateDataNodeREQ.cpp
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:1k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- // PCreateDataNodeREQ.cpp: implementation of the PCreateDataNodeREQ class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "PCreateDataNodeREQ.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- PCreateDataNodeREQ::PCreateDataNodeREQ()
- {
- this->Tag = PCreateDataNodeREQTAG;
- this->name = "";
- }
- PCreateDataNodeREQ::~PCreateDataNodeREQ()
- {
- }
- bool PCreateDataNodeREQ::assembleData( const char * name )
- {
- this->buffer.Resize( 2 * INT_SIZE + strlen( name ) + CHAR_SIZE );
- char * now = this->buffer.GetBuffer( );
- *( int * )now = this->buffer.GetSize( ); now += INT_SIZE;
- *( int * )now = this->Tag; now += INT_SIZE;
- strcpy( now , name );
- return true;
- }
- bool PCreateDataNodeREQ::parseData( CBuffer & buffer )
- {
- if( ! buffer.GetSize( ) ) return false;
- this->name = buffer.GetBuffer( ) + 2 * INT_SIZE;
- return true;
- }