本文整理汇总了C++中STRING_LIST::push_front方法的典型用法代码示例。如果您正苦于以下问题:C++ STRING_LIST::push_front方法的具体用法?C++ STRING_LIST::push_front怎么用?C++ STRING_LIST::push_front使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类STRING_LIST
的用法示例。
在下文中一共展示了STRING_LIST::push_front方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetRegistrations
bool COrbitTask::GetRegistrations(STRING_LIST &List)
{
List.push_front("NAV_X");
List.push_front("NAV_Y");
List.push_front("NAV_YAW");
//always call base class version
CMOOSBehaviour::GetRegistrations(List);
return true;
}
示例2: GetRegistrations
bool CLimitBox::GetRegistrations(STRING_LIST &List)
{
List.push_front("NAV_DEPTH");
List.push_front("NAV_X");
List.push_front("NAV_Y");
//always call base class version
CMOOSBehaviour::GetRegistrations(List);
return true;
}
示例3: GetRegistrations
bool CThirdPartyTask::GetRegistrations(STRING_LIST &List)
{
List.push_front(m_sJob);
//always call base class version
CMOOSBehaviour::GetRegistrations(List);
return true;
}
示例4: GetRegistrations
bool CZPatternTask::GetRegistrations(STRING_LIST &List)
{
List.push_front("NAV_DEPTH");
List.push_front("NAV_PITCH");
//always call base class version
CMOOSBehaviour::GetRegistrations(List);
return true;
}
示例5: GetRegistrations
bool CManualControl::GetRegistrations(STRING_LIST &List)
{
DOF_MAP::iterator i;
for(i=m_ManualDOFs.begin(); i!=m_ManualDOFs.end(); i++)
List.push_front((string)"MANUAL_"+i->first);
//always call base class version
CSGMOOSBehaviour::GetRegistrations(List);
return true;
}
示例6: GetClientNames
bool CMOOSCommServer::GetClientNames(STRING_LIST &sList)
{
sList.clear();
SOCKETFD_2_CLIENT_NAME_MAP::iterator p;
for(p = m_Socket2ClientMap.begin();p!=m_Socket2ClientMap.end();p++)
{
sList.push_front(p->second);
}
return true;
}
示例7: MOOSRemoveChars
bool CHelmApp::CTransaction::BuildParameterList(string sList, STRING_LIST &ParameterList)
{
//remove the whitespace
MOOSRemoveChars(sList," ");
//sList has format:
//LOCATION=0,0,0|RADIUS=5
while(!sList.empty())
{
string sWhat = MOOSChomp(sList,"|");
MOOSToUpper(sWhat);
ParameterList.push_front(sWhat);
}
return true;
}
示例8: GetConfiguration
bool CProcessConfigReader::GetConfiguration(std::string sAppName, STRING_LIST &Params)
{
int nBrackets = 0;
Params.clear();
Reset();
std::string sKey = "PROCESSCONFIG="+sAppName;
if(GoTo(sKey))
{
std::string sBracket = GetNextValidLine();
if(sBracket.find("{")==0)
{
nBrackets++;
while(!GetFile()->eof())
{
std::string sLine = GetNextValidLine();
MOOSRemoveChars(sLine," \t\r");
if(sLine.find("}")!=0)
{
#if(1)
// jckerken 8-12-2004
// ignore if param = <empty string>
std::string sTmp(sLine);
std::string sTok = MOOSChomp(sTmp, "=");
MOOSTrimWhiteSpace(sTok); // Handle potential whitespaces.
MOOSTrimWhiteSpace(sTmp);
if (sTok.size() > 0)
{
MOOSTrimWhiteSpace(sTmp);
if (!sTmp.empty())
{
Params.push_front(sTok+std::string("=")+sTmp); // Was: sLine
}
else if(sLine.find("[")!=std::string::npos || sLine.find("]")!=std::string::npos)
{
Params.push_front(sTok+std::string("=")+sTmp); // Was: sLine
}
}
else
{
Params.push_front(sTok+std::string("=")+sTmp); // Was: sLine
}
#else
Params.push_front(sLine);
#endif
}
else
{
return true;
}
//quick error check - we don't allow nested { on single lines
if(sLine.find("{")==0)
{
MOOSTrace("CProcessConfigReader::GetConfiguration() missing \"}\" syntax error in mission file\n");
}
}
}
}
return false;
}
示例9: InitialiseTransactors
bool CHelmApp::InitialiseTransactors()
{
//a CTransaction object is responsible for knowing about transactions
m_Transaction.Initialise();
//FORMAT is
//ALLOW = [email protected]:TASK1,TASK2|SessionTimeOut=value
STRING_LIST Params;
PERMISSIONS_MAP PermissionsMap;
SESSION_TIMEOUT_MAP SessionTimeOutMap;
if(m_MissionReader.GetConfiguration(m_sAppName,Params))
{
STRING_LIST::iterator p;
for(p=Params.begin();p!=Params.end();p++)
{
string sParam = *p;
//get rid of the whitespace
MOOSRemoveChars(sParam," ");
string sWhat = MOOSChomp(sParam,"=");
MOOSToUpper(sWhat);
if(MOOSStrCmp(sWhat,"ALLOW"))
{
//Tasks that can be fired by the [email protected]
string sClientInfo = MOOSChomp(sParam,"|");
string sWho = MOOSChomp(sClientInfo,":");
MOOSToUpper(sWho);
STRING_LIST Tasks;
while(!sClientInfo.empty())
{
string sUpperParam = MOOSChomp(sClientInfo,",");
MOOSToUpper(sUpperParam);
Tasks.push_front(sUpperParam);
}
PermissionsMap[sWho] = Tasks;
//SessionTimeOuts for these particular Tasks
string sVar = MOOSChomp(sParam, "=");
MOOSToUpper(sVar);
if(MOOSStrCmp(sVar, "SESSIONTIMEOUT"))
{
double dfVal = atof(sParam.c_str());
if((dfVal > 0) && (dfVal < MAX_SESSION_TIMEOUT))
{
SessionTimeOutMap[sWho] = dfVal;
}
else if((dfVal > 0) && (dfVal > MAX_SESSION_TIMEOUT))
{
SessionTimeOutMap[sWho] = MAX_SESSION_TIMEOUT;
}
}
}
}
//make sure the Transacation knows about these maps
m_Transaction.SetPermissionsMap(PermissionsMap);
m_Transaction.SetSessionTimeOutMap(SessionTimeOutMap);
}
//we initially are not talking to anyone
m_Comms.Notify("CURRENT_THIRDPARTY", "NONE");
return true;
}