std::string LinNsCodeGenHelper::GetConstructorDef(IFrame* frame) { std::ostringstream outStream; std::string frameUniqueName = GetUniqueName(frame); outStream << frameUniqueName <<"::" << frameUniqueName << "(STLIN_MSG* objLinMsg)" <<std::endl; return outStream.str(); }
std::string LinNsCodeGenHelper::GetSignalsConstructorDef(IFrame* frame) { std::map<ISignal*, SignalInstanse> ouSignalList; std::string frameName; std::ostringstream outStream; frame->GetSignalList(ouSignalList); frameName = GetUniqueName(frame); int nSignalCount = ouSignalList.size(); int iSignalIndex = 0; std::map<std::string, std::string> signalMap; std::string signalName; for( auto itr = ouSignalList.begin(); itr != ouSignalList.end(); ++itr ) { itr->first->GetName(signalName); if (signalMap.end() == signalMap.find(signalName)) { signalMap[signalName] = signalName; if (iSignalIndex < nSignalCount) { outStream << "," << std::endl; iSignalIndex++; } outStream << GenerateSignalConstuctor(itr->second.m_nStartBit, itr->first, itr->second.m_ouSignalEndianess, frameName); } } return outStream.str(); }
void EditorCamera::OnCreated() { auto camera = std::dynamic_pointer_cast<Camera>(GetParent()); if (!frustum_) frustum_ = camera->CreateChild<EditorFrustum>(GetUniqueName("EditorFrustum")); frustum_->SetCamera(camera); }
std::string J1939NsCodeGenHelper::GetBaseClassConstructorDef(IFrame* frame) { std::ostringstream outStream; unsigned int frameId = 0; unsigned int dlc = 0; std::string frameUniqueName = GetUniqueName(frame); frame->GetFrameId(frameId); frame->GetLength(dlc); CANFrameProps eouFrameProps; frame->GetProperties(eouFrameProps); bool bIsExtended = 0; if (eCan_Extended == eouFrameProps.m_canMsgType) { bIsExtended = 1; } //BMLINMsg(std::string _name, unsigned char _checksumtype, int _id, int _dlc, STLIN_MSG* pMsg = NULL) outStream << defCANBaseMsg << "(" << "\"" << frameUniqueName << "\"" << "," << frameId << ", " << dlc << ", " << "objJ1939Msg" << ")"; return outStream.str(); }
/*---------------------------------------------------------------------------*/ bool wxGridColumnsTable::AppendRows(size_t numRows) { for (size_t i = 0; i < numRows; i ++) { wxColumnCtrTable* item = new wxColumnCtrTable; item->SetName(GetUniqueName()); m_Columns.Add(item); } if (GetView()) { wxGridTableMessage msg(this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, numRows); GetView()->ProcessTableMessage(msg); } return true; }
/*---------------------------------------------------------------------------*/ bool wxGridColumnsTable::InsertRows(size_t pos, size_t numRows) { for (size_t i = 0; i < numRows; i ++) { wxColumnCtrTable* item = new wxColumnCtrTable; item->SetName(GetUniqueName()); m_Columns.Insert(item, pos + i); } if (GetView()) { wxGridTableMessage msg(this, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, pos, numRows); GetView()->ProcessTableMessage( msg ); } return true; }
std::string LinNsCodeGenHelper::GetSignalsDecl(IFrame* frame) { std::map<ISignal*, SignalInstanse> ouSignalList; std::ostringstream outStream; frame->GetSignalList(ouSignalList); std::string containerName = GetUniqueName(frame); std::string retVal; for( auto itr = ouSignalList.begin(); itr != ouSignalList.end(); ++itr ) { retVal += GenerateSignalDecl( itr->first, containerName) + "\n"; } return retVal; }
std::string LinNsCodeGenHelper::GetBaseClassConstructorDef(IFrame* frame) { std::ostringstream outStream; unsigned int frameId = 0; unsigned int dlc = 0; std::string frameUniqueName = GetUniqueName(frame); frame->GetFrameId(frameId); frame->GetLength(dlc); //BMLINMsg(std::string _name, unsigned char _checksumtype, int _id, int _dlc, STLIN_MSG* pMsg = NULL) outStream << defLinBaseMsg << "(" <<"\"" << frameUniqueName << "\"" << "," << GetCheckSumType() << "," << frameId << "," <<dlc << "," <<"objLinMsg" << ")"; return outStream.str(); }
std::string LinNsCodeGenHelper::GetBaseClassDecl(IFrame* frame) { std::ostringstream outStream; outStream << GetUniqueName(frame) << "(STLIN_MSG* objLinMsg = NULL);"; return outStream.str(); }
std::string LinNsCodeGenHelper::GetDecl(IFrame* frame) { std::ostringstream outStream; outStream << "class" <<" " << GetUniqueName(frame) << ":" << "public" << " " << defLinBaseMsg; return outStream.str(); }
std::string J1939NsCodeGenHelper::GetBaseClassDecl(IFrame* frame) { std::ostringstream outStream; outStream << GetUniqueName(frame) << "(J1939_MSG* objJ1939Msg = NULL);"; return outStream.str(); }