本文整理汇总了C++中Model::GetStrandLength方法的典型用法代码示例。如果您正苦于以下问题:C++ Model::GetStrandLength方法的具体用法?C++ Model::GetStrandLength怎么用?C++ Model::GetStrandLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model
的用法示例。
在下文中一共展示了Model::GetStrandLength方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddModel
void LMSImportChannelMapDialog::AddModel(Model &cls) {
ChannelMapGrid->BeginBatch();
int i = ChannelMapGrid->GetNumberRows();
ChannelMapGrid->AppendRows(cls.GetNumStrands() + 1);
ChannelMapGrid->SetCellValue(i, 0, cls.name);
i++;
for (int s = 0; s < cls.GetNumStrands(); s++) {
ChannelMapGrid->SetCellValue(i, 0, cls.name);
wxString sn = cls.GetStrandName(s);
if ("" == sn) {
sn = wxString::Format("Strand %d", s + 1);
}
ChannelMapGrid->SetCellValue(i, 1, sn);
i++;
if (!MapByStrand->GetValue()) {
ChannelMapGrid->AppendRows(cls.GetStrandLength(s));
for (int n = 0; n < cls.GetStrandLength(s); n++) {
ChannelMapGrid->SetCellValue(i, 0, cls.name);
ChannelMapGrid->SetCellValue(i, 1, sn);
wxString nn = cls.GetNodeName(cls.MapToNodeIndex(s, n));
if ("" == nn) {
nn = wxString::Format("Node %d", n + 1);
}
ChannelMapGrid->SetCellValue(i, 2, nn);
i++;
}
}
}
ChannelMapGrid->EndBatch();
}
示例2: InitStrandBuffer
void PixelBufferClass::InitStrandBuffer(const Model &pbc, int strand, int timing)
{
if (ssModel == nullptr) {
ssModel = new SingleLineModel(pbc.GetModelManager());
}
ssModel->Reset(pbc.GetStrandLength(strand), pbc, strand);
model = ssModel;
reset(2, timing);
}
示例3: InitFromModel
void StrandLayer::InitFromModel(Model &model) {
int nc = model.GetStrandLength(strand);
SetName(model.GetStrandName(strand));
for (int x = 0; x < mNodeLayers.size(); x++) {
mNodeLayers[x]->SetName(model.GetNodeName(x));
}
while (mNodeLayers.size() < nc) {
NodeLayer *nl = new NodeLayer(GetParentElement(), model.GetNodeName(mNodeLayers.size()));
mNodeLayers.push_back(nl);
}
}