sbinary.cpp
来自「用于仿真系统中多个仿真对象间的内存管理」· C++ 代码 · 共 51 行
CPP
51 行
// SBinary.cpp: implementation of the SBinary class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "SBinary.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
SBinary::SBinary()
{
inportnum = 0;
outportnum = 1;
nblock = 4;
nsamp = 8;
port_type = OUTPORT;
data_type = PTREAL;
}
SBinary::~SBinary()
{
}
void SBinary::Inital_OutPort()
{
IOPort* port = new IOPort(nblock,port_type,data_type);
port->SetPortID(0);
outport_list.push_back(port);
}
void SBinary::OutPutData()
{
binarydata = GetBuf(0);
cout << "Source\t" << typeid(*this).name() << " info:" << endl;
cout << "OutPutBuffer is: " << binarydata <<endl;
cout << endl;
}
void SBinary::GenerateData()
{
for(int i=0;i<nblock;i++)
binarydata[i] = 1;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?