本文整理汇总了C++中Subscriber::SetRvectorParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ Subscriber::SetRvectorParameter方法的具体用法?C++ Subscriber::SetRvectorParameter怎么用?C++ Subscriber::SetRvectorParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Subscriber
的用法示例。
在下文中一共展示了Subscriber::SetRvectorParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveChildPositionAndSize
//.........这里部分代码省略.........
#ifdef DEBUG_PERSISTENCE
// ======================= begin temporary ==============================
MessageInterface::ShowMessage("*** Size of SCREEN %s is: width = %d, height = %d\n",
mChildName.WX_TO_C_STRING, screenWidth, screenHeight);
MessageInterface::ShowMessage("Position of View plot %s is: x = %d, y = %d\n",
mChildName.WX_TO_C_STRING, tmpX, tmpY);
MessageInterface::ShowMessage("Size of View plot %s is: width = %d, height = %d\n",
mChildName.WX_TO_C_STRING, tmpW, tmpH);
// ======================= end temporary ==============================
#endif
if ((mItemType == GmatTree::OUTPUT_REPORT) ||
(mItemType == GmatTree::OUTPUT_CCSDS_OEM_FILE ) ||
(mItemType == GmatTree::OUTPUT_ORBIT_VIEW) ||
(mItemType == GmatTree::OUTPUT_XY_PLOT) ||
(mItemType == GmatTree::OUTPUT_GROUND_TRACK_PLOT)
// We'll want to add the event reports eventually, but they are not subscriber based
//|| (mItemType == GmatTree::EVENT_REPORT)
)
{
GmatBase *obj = theGuiInterpreter->GetConfiguredObject(mChildName.c_str());
#ifdef DEBUG_FUNCTION
// Check if child name is the configured object name
MessageInterface::ShowMessage
("GmatMdiChildFrame::SaveChildPositionAndSize() the child '%s' %s a "
"configured object, obj = <%p>[%s]'%s'\n", mChildName.WX_TO_C_STRING,
obj ? "is" : "is not", obj, obj ? obj->GetTypeName().c_str() : "NULL",
obj ? obj->GetName().c_str() : "NULL");
#endif
if (!obj)
{
// Just return if child is not a configured subscriber,ie,
// plotting from GMAT function (LOJ: 2015.06.26)
#ifdef DEBUG_FUNCTION
MessageInterface::ShowMessage
("**** WARNING **** GmatMdiChildFrame::SaveChildPositionAndSize() "
"will not save position and size for unconfigured subscriber '%s'\n",
mChildName.WX_TO_C_STRING);
#endif
return;
}
else if (!obj->IsOfType("Subscriber"))
{
#ifdef DEBUG_PERSISTENCE
MessageInterface::ShowMessage
("**** WARNING **** GmatMdiChildFrame::SaveChildPositionAndSize() "
"cannot not save position and size for non-subscriber '%s'\n",
mChildName.WX_TO_C_STRING);
#endif
SubscriberException se;
se.SetDetails("Cannot set position and size for non-subscriber '%s'");
throw se;
}
Subscriber *sub = (Subscriber*) obj;
#ifdef DEBUG_PERSISTENCE
MessageInterface::ShowMessage("...... Now saving plot data to %s:\n", (sub->GetName()).c_str());
MessageInterface::ShowMessage(" Upper left = %12.10f %12.10f\n", upperLeft[0], upperLeft[1]);
MessageInterface::ShowMessage(" Size = %12.10f %12.10f\n", childSize[0], childSize[1]);
MessageInterface::ShowMessage(" RelativeZOrder = %d\n", relativeZOrder);
#endif
sub->SetRvectorParameter(sub->GetParameterID("UpperLeft"), upperLeft);
sub->SetRvectorParameter(sub->GetParameterID("Size"), childSize);
sub->SetIntegerParameter(sub->GetParameterID("RelativeZOrder"), relativeZOrder);
sub->SetBooleanParameter(sub->GetParameterID("Maximized"), isMaximized);
}
else if (mItemType == GmatTree::MISSION_TREE_UNDOCKED)
{
// get the config object
wxFileConfig *pConfig;
pConfig = (wxFileConfig *) GmatAppData::Instance()->GetPersonalizationConfig();
std::stringstream location("");
location << upperLeft[0] << " " << upperLeft[1];
std::stringstream size("");
size << childSize[0] << " " << childSize[1];
pConfig->Write("/MissionTree/UpperLeft", location.str().c_str());
pConfig->Write("/MissionTree/Size", size.str().c_str());
pConfig->Write("/MissionTree/IsMaximized", isMaximized);
pConfig->Write("/MissionTree/IsMinimized", isMinimized);
}
else if (mItemType == GmatTree::SCRIPT_FILE)
{
// get the config object
wxFileConfig *pConfig;
pConfig = (wxFileConfig *) GmatAppData::Instance()->GetPersonalizationConfig();
std::stringstream location("");
location << upperLeft[0] << " " << upperLeft[1];
std::stringstream size("");
size << childSize[0] << " " << childSize[1];
pConfig->Write("/ScriptEditor/UpperLeft", location.str().c_str());
pConfig->Write("/ScriptEditor/Size", size.str().c_str());
pConfig->Write("/ScriptEditor/IsMaximized", isMaximized);
pConfig->Write("/ScriptEditor/IsMinimized", isMinimized);
}
}