mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Visual Studio 2013 compilation support for Ryzom Client
--HG-- branch : develop
This commit is contained in:
parent
1879a434f7
commit
32b3b4ac80
11 changed files with 56 additions and 56 deletions
|
@ -568,7 +568,7 @@ void listStereoDisplayDevices(std::vector<NL3D::CStereoDeviceInfo> &devices)
|
||||||
std::stringstream name;
|
std::stringstream name;
|
||||||
name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName;
|
name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName;
|
||||||
std::stringstream fullname;
|
std::stringstream fullname;
|
||||||
fullname << std::string("[") << name << "] [" << it->Serial << "]";
|
fullname << std::string("[") << name.str() << "] [" << it->Serial << "]";
|
||||||
nlinfo("VR [C]: Stereo Display: %s", name.str().c_str());
|
nlinfo("VR [C]: Stereo Display: %s", name.str().c_str());
|
||||||
if (cache)
|
if (cache)
|
||||||
{
|
{
|
||||||
|
|
|
@ -333,29 +333,29 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
if (NLMISC::strlwr(prop) == "item")
|
if (NLMISC::strlwr(prop.str()) == "item")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Item;
|
_Type = CCtrlSheetInfo::SheetType_Item;
|
||||||
else if (NLMISC::strlwr(prop) == "pact")
|
else if (NLMISC::strlwr(prop.str()) == "pact")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Pact;
|
_Type = CCtrlSheetInfo::SheetType_Pact;
|
||||||
else if (NLMISC::strlwr(prop) == "skill")
|
else if (NLMISC::strlwr(prop.str()) == "skill")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Skill;
|
_Type = CCtrlSheetInfo::SheetType_Skill;
|
||||||
else if (NLMISC::strlwr(prop) == "auto")
|
else if (NLMISC::strlwr(prop.str()) == "auto")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Auto;
|
_Type = CCtrlSheetInfo::SheetType_Auto;
|
||||||
else if (NLMISC::strlwr(prop) == "macro")
|
else if (NLMISC::strlwr(prop.str()) == "macro")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Macro;
|
_Type = CCtrlSheetInfo::SheetType_Macro;
|
||||||
else if (NLMISC::strlwr(prop) == "guild_flag")
|
else if (NLMISC::strlwr(prop.str()) == "guild_flag")
|
||||||
_Type = CCtrlSheetInfo::SheetType_GuildFlag;
|
_Type = CCtrlSheetInfo::SheetType_GuildFlag;
|
||||||
else if (NLMISC::strlwr(prop) == "mission")
|
else if (NLMISC::strlwr(prop.str()) == "mission")
|
||||||
_Type = CCtrlSheetInfo::SheetType_Mission;
|
_Type = CCtrlSheetInfo::SheetType_Mission;
|
||||||
else if (NLMISC::strlwr(prop) == "sbrick")
|
else if (NLMISC::strlwr(prop.str()) == "sbrick")
|
||||||
_Type = CCtrlSheetInfo::SheetType_SBrick;
|
_Type = CCtrlSheetInfo::SheetType_SBrick;
|
||||||
else if (NLMISC::strlwr(prop) == "sphraseid")
|
else if (NLMISC::strlwr(prop.str()) == "sphraseid")
|
||||||
_Type = CCtrlSheetInfo::SheetType_SPhraseId;
|
_Type = CCtrlSheetInfo::SheetType_SPhraseId;
|
||||||
else if (NLMISC::strlwr(prop) == "sphrase")
|
else if (NLMISC::strlwr(prop.str()) == "sphrase")
|
||||||
_Type = CCtrlSheetInfo::SheetType_SPhrase;
|
_Type = CCtrlSheetInfo::SheetType_SPhrase;
|
||||||
else if (NLMISC::strlwr(prop) == "elevator_destination")
|
else if (NLMISC::strlwr(prop.str()) == "elevator_destination")
|
||||||
_Type = CCtrlSheetInfo::SheetType_ElevatorDestination;
|
_Type = CCtrlSheetInfo::SheetType_ElevatorDestination;
|
||||||
else if (NLMISC::strlwr(prop) == "outpost_building")
|
else if (NLMISC::strlwr(prop.str()) == "outpost_building")
|
||||||
_Type = CCtrlSheetInfo::SheetType_OutpostBuilding;
|
_Type = CCtrlSheetInfo::SheetType_OutpostBuilding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
// get a branch in the database.
|
// get a branch in the database.
|
||||||
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);
|
CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(prop.str());
|
||||||
if(!branch)
|
if(!branch)
|
||||||
{
|
{
|
||||||
nlinfo ("Branch not found in the database %s", (const char*)prop);
|
nlinfo ("Branch not found in the database %s", (const char*)prop);
|
||||||
|
|
|
@ -98,7 +98,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
// get a branch in the database.
|
// get a branch in the database.
|
||||||
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);
|
CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(prop.str());
|
||||||
if(!branch)
|
if(!branch)
|
||||||
{
|
{
|
||||||
nlinfo ("Branch not found in the database %s", (const char*)prop);
|
nlinfo ("Branch not found in the database %s", (const char*)prop);
|
||||||
|
|
|
@ -162,13 +162,13 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
_Ref3DScene = NULL;
|
_Ref3DScene = NULL;
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(this->getId(), ptr);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(this->getId(), ptr.str());
|
||||||
_Ref3DScene = dynamic_cast<CInterface3DScene*>(pIE);
|
_Ref3DScene = dynamic_cast<CInterface3DScene*>(pIE);
|
||||||
}
|
}
|
||||||
if (_Ref3DScene != NULL)
|
if (_Ref3DScene != NULL)
|
||||||
{
|
{
|
||||||
ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" );
|
ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" );
|
||||||
if (ptr) setCurrentCamera (ptr);
|
if (ptr) setCurrentCamera (ptr.str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name"));
|
CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name"));
|
||||||
string animName;
|
string animName;
|
||||||
if (ptr)
|
if (ptr)
|
||||||
animName = strlwr (CFile::getFilenameWithoutExtension(ptr));
|
animName = strlwr (CFile::getFilenameWithoutExtension(ptr.str()));
|
||||||
|
|
||||||
if (!animName.empty())
|
if (!animName.empty())
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
|
|
||||||
// Get the current camera
|
// Get the current camera
|
||||||
ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" );
|
ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" );
|
||||||
if (ptr) setCurrentCamera (ptr);
|
if (ptr) setCurrentCamera(ptr.str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1981,7 +1981,7 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */)
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"inv_type");
|
prop = xmlGetProp (cur, (xmlChar*)"inv_type");
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
InvType = CInventoryManager::invTypeFromString(prop);
|
InvType = CInventoryManager::invTypeFromString(prop.str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1990,22 +1990,22 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */)
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"filter_armor");
|
prop = xmlGetProp (cur, (xmlChar*)"filter_armor");
|
||||||
if (prop) DbFilterArmor = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
if (prop) DbFilterArmor = NLGUI::CDBManager::getInstance()->getDbProp(prop.str());
|
||||||
|
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"filter_weapon");
|
prop = xmlGetProp (cur, (xmlChar*)"filter_weapon");
|
||||||
if (prop) DbFilterWeapon = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
if (prop) DbFilterWeapon = NLGUI::CDBManager::getInstance()->getDbProp(prop.str());
|
||||||
|
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"filter_tool");
|
prop = xmlGetProp (cur, (xmlChar*)"filter_tool");
|
||||||
if (prop) DbFilterTool = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
if (prop) DbFilterTool = NLGUI::CDBManager::getInstance()->getDbProp(prop.str());
|
||||||
|
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"filter_mp");
|
prop = xmlGetProp (cur, (xmlChar*)"filter_mp");
|
||||||
if (prop) DbFilterMP = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
if (prop) DbFilterMP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str());
|
||||||
|
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"filter_missmp");
|
prop = xmlGetProp (cur, (xmlChar*)"filter_missmp");
|
||||||
if (prop) DbFilterMissMP = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
if (prop) DbFilterMissMP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str());
|
||||||
|
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"filter_tp");
|
prop = xmlGetProp (cur, (xmlChar*)"filter_tp");
|
||||||
if (prop) DbFilterTP = NLGUI::CDBManager::getInstance()->getDbProp(prop);
|
if (prop) DbFilterTP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -369,7 +369,7 @@ bool CCommandParser::parse( xmlNodePtr cur, NLGUI::CInterfaceGroup *parentGroup
|
||||||
// if prop "ctrlchar" is declared with false, then disable ctrlchar for this command
|
// if prop "ctrlchar" is declared with false, then disable ctrlchar for this command
|
||||||
CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"ctrlchar" ));
|
CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"ctrlchar" ));
|
||||||
if( (const char*)prop && (CInterfaceElement::convertBool((const char*)prop)==false) )
|
if( (const char*)prop && (CInterfaceElement::convertBool((const char*)prop)==false) )
|
||||||
ICommand::enableControlCharForCommand(ptrName, false);
|
ICommand::enableControlCharForCommand(ptrName.str(), false);
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
|
@ -381,7 +381,7 @@ void CBSIINonModule::activate()
|
||||||
// setup the callback array
|
// setup the callback array
|
||||||
CUnifiedNetwork::getInstance()->addCallbackArray( CbArray, sizeof(CbArray)/sizeof(CbArray[0]) );
|
CUnifiedNetwork::getInstance()->addCallbackArray( CbArray, sizeof(CbArray)/sizeof(CbArray[0]) );
|
||||||
|
|
||||||
string host = BackupServiceIP;
|
string host = BackupServiceIP.get();
|
||||||
if(host.empty())
|
if(host.empty())
|
||||||
{
|
{
|
||||||
nlwarning("Can't use backup because BSHost variable is empty");
|
nlwarning("Can't use backup because BSHost variable is empty");
|
||||||
|
|
|
@ -313,13 +313,13 @@ namespace DEPCFG
|
||||||
|
|
||||||
void CInfoBlock::addUseEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors)
|
void CInfoBlock::addUseEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors)
|
||||||
{
|
{
|
||||||
DROP_IF(_UseEntries.find(entry)!=_UseEntries.end(),context+"Ignoring duplicate refference to 'use' clause: "+entry,return);
|
DROP_IF(_UseEntries.find(entry) != _UseEntries.end(), context + "Ignoring duplicate refference to 'use' clause: " + entry.c_str(), return);
|
||||||
_UseEntries.insert(entry);
|
_UseEntries.insert(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoBlock::addDataEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors)
|
void CInfoBlock::addDataEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors)
|
||||||
{
|
{
|
||||||
DROP_IF(_DataEntries.find(entry)!=_DataEntries.end(),context+"Ignoring duplicate refference to 'data' clause: "+entry,return);
|
DROP_IF(_DataEntries.find(entry) != _DataEntries.end(), context + "Ignoring duplicate refference to 'data' clause: " + entry.c_str(), return);
|
||||||
_DataEntries.insert(entry);
|
_DataEntries.insert(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,10 +406,10 @@ namespace DEPCFG
|
||||||
|
|
||||||
// try to get a pointer to the refferenced info block...
|
// try to get a pointer to the refferenced info block...
|
||||||
CInfoBlock* infoBlockPtr= container->getInfoBlock(theEntry);
|
CInfoBlock* infoBlockPtr= container->getInfoBlock(theEntry);
|
||||||
DROP_IF(infoBlockPtr==NULL,"Failed to find block named '"+theEntry+"' while fixing up children of block: "+_Name, ++errors;continue);
|
DROP_IF(infoBlockPtr == NULL, "Failed to find block named '" + theEntry + "' while fixing up children of block: " + _Name.c_str(), ++errors; continue);
|
||||||
|
|
||||||
// make sure that this block doesn't figure amongst the children of the refferenced info block (to avoid circular refs)
|
// make sure that this block doesn't figure amongst the children of the refferenced info block (to avoid circular refs)
|
||||||
DROP_IF(_haveCircularRef(infoBlockPtr),"Circular dependency found between definitions of '"+_Name+"' and '"+theEntry+"'", ++errors;continue);
|
DROP_IF(_haveCircularRef(infoBlockPtr), "Circular dependency found between definitions of '" + _Name + "' and '" + theEntry.c_str() + "'", ++errors; continue);
|
||||||
|
|
||||||
// add the info block to our children
|
// add the info block to our children
|
||||||
_Children.push_back(infoBlockPtr);
|
_Children.push_back(infoBlockPtr);
|
||||||
|
@ -431,7 +431,7 @@ namespace DEPCFG
|
||||||
DROP_IF(!_ShardName.empty() && !theExe.ShardName.empty(), "more than one shard found in: "+theExe.FullName, ++errors );
|
DROP_IF(!_ShardName.empty() && !theExe.ShardName.empty(), "more than one shard found in: "+theExe.FullName, ++errors );
|
||||||
DROP_IF(!_CmdLine.empty() && !theExe.CmdLine.empty(), "more than one cmdLine found in: "+theExe.FullName, ++errors );
|
DROP_IF(!_CmdLine.empty() && !theExe.CmdLine.empty(), "more than one cmdLine found in: "+theExe.FullName, ++errors );
|
||||||
DROP_IF(!_Host.empty() && !theExe.Host.empty(), "more than one host found in: "+theExe.FullName, ++errors );
|
DROP_IF(!_Host.empty() && !theExe.Host.empty(), "more than one host found in: "+theExe.FullName, ++errors );
|
||||||
WARN_IF(!_UniqueName.empty() && !theExe.UniqueName.empty(), "replacing name '"+theExe.UniqueName+"' with '"+_UniqueName+"' in: "+theExe.FullName);
|
WARN_IF(!_UniqueName.empty() && !theExe.UniqueName.empty(), "replacing name '" + theExe.UniqueName + "' with '" + _UniqueName.c_str() + "' in: " + theExe.FullName.c_str());
|
||||||
|
|
||||||
// fill our own data into the exe record
|
// fill our own data into the exe record
|
||||||
if (!_DomainName.empty()) theExe.DomainName = _DomainName;
|
if (!_DomainName.empty()) theExe.DomainName = _DomainName;
|
||||||
|
@ -645,22 +645,22 @@ namespace DEPCFG
|
||||||
// try to treat the keyword
|
// try to treat the keyword
|
||||||
if (keyword=="include")
|
if (keyword=="include")
|
||||||
{
|
{
|
||||||
DROP_IF(args.empty(),context+"No file name found following 'include': "+line, ++errors;continue);
|
DROP_IF(args.empty(), context + "No file name found following 'include': " + line.c_str(), ++errors; continue);
|
||||||
DROP_IF(fileNameSet.find(args)!=fileNameSet.end(),context+"Warning: Duplicate 'include' block ignored: "+line, continue);
|
DROP_IF(fileNameSet.find(args) != fileNameSet.end(), context + "Warning: Duplicate 'include' block ignored: " + line.c_str(), continue);
|
||||||
fileNameSet.insert(args);
|
fileNameSet.insert(args);
|
||||||
_readFile(args.unquoteIfQuoted(),errors,fileNameSet);
|
_readFile(args.unquoteIfQuoted(),errors,fileNameSet);
|
||||||
}
|
}
|
||||||
else if (keyword=="define")
|
else if (keyword=="define")
|
||||||
{
|
{
|
||||||
DROP_IF(args.empty(),context+"No block name found following 'define': "+line, ++errors;continue);
|
DROP_IF(args.empty(), context + "No block name found following 'define': " + line.c_str(), ++errors; continue);
|
||||||
DROP_IF(_InfoBlocks.find(args)!=_InfoBlocks.end(),context+"Duplicate 'define' block found: "+line, ++errors;continue);
|
DROP_IF(_InfoBlocks.find(args) != _InfoBlocks.end(), context + "Duplicate 'define' block found: " + line.c_str(), ++errors; continue);
|
||||||
// create a new info block and push it into our infoblock set
|
// create a new info block and push it into our infoblock set
|
||||||
_CurrentInfoBlock= new CInfoBlock(args);
|
_CurrentInfoBlock= new CInfoBlock(args);
|
||||||
_InfoBlocks[args]= _CurrentInfoBlock;
|
_InfoBlocks[args]= _CurrentInfoBlock;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DROP_IF(_CurrentInfoBlock==NULL,context+"Expecting 'define <block_name>' but found: "+line, ++errors;continue);
|
DROP_IF(_CurrentInfoBlock == NULL, context + "Expecting 'define <block_name>' but found: " + line.c_str(), ++errors; continue);
|
||||||
|
|
||||||
if (keyword=="domain") { _CurrentInfoBlock->setDomainName(args,context,errors); }
|
if (keyword=="domain") { _CurrentInfoBlock->setDomainName(args,context,errors); }
|
||||||
else if (keyword=="shard") { _CurrentInfoBlock->setShardName(args,context,errors); }
|
else if (keyword=="shard") { _CurrentInfoBlock->setShardName(args,context,errors); }
|
||||||
|
@ -674,7 +674,7 @@ namespace DEPCFG
|
||||||
else if (keyword=="cfgAfter") { _CurrentInfoBlock->addCfgEntryPost(rawArgs,context,errors); }
|
else if (keyword=="cfgAfter") { _CurrentInfoBlock->addCfgEntryPost(rawArgs,context,errors); }
|
||||||
else if (keyword=="cfgFile") { _CurrentInfoBlock->addCfgFile(args,context,errors); }
|
else if (keyword=="cfgFile") { _CurrentInfoBlock->addCfgFile(args,context,errors); }
|
||||||
else if (keyword=="cfgFileAfter") { _CurrentInfoBlock->addCfgFilePost(args,context,errors); }
|
else if (keyword=="cfgFileAfter") { _CurrentInfoBlock->addCfgFilePost(args,context,errors); }
|
||||||
else { DROP(context+"Unrecognised keyword: "+line, ++errors;continue); }
|
else { DROP(context + "Unrecognised keyword: " + line.c_str(), ++errors; continue); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -725,7 +725,7 @@ namespace DEPCFG
|
||||||
// yell if the name already looks like a 'fixed up' name
|
// yell if the name already looks like a 'fixed up' name
|
||||||
DROP_IF(name.right(3).left(1)=="_" && (name.right(2)=="00" || name.right(2).atoui()!=0),"Appending '_' to name ending in '_00' style format as this can clash with auto renumbering => "+name+'_',name+='_')
|
DROP_IF(name.right(3).left(1)=="_" && (name.right(2)=="00" || name.right(2).atoui()!=0),"Appending '_' to name ending in '_00' style format as this can clash with auto renumbering => "+name+'_',name+='_')
|
||||||
// compose a second version of the name with the shard name added
|
// compose a second version of the name with the shard name added
|
||||||
NLMISC::CSString name_with_shard= name+'_'+it2->ShardName;
|
NLMISC::CSString name_with_shard = name + '_' + it2->ShardName.c_str();
|
||||||
// insert both versions of the name into the unique name counter
|
// insert both versions of the name into the unique name counter
|
||||||
++nameCounts[name];
|
++nameCounts[name];
|
||||||
++nameCounts[name_with_shard];
|
++nameCounts[name_with_shard];
|
||||||
|
@ -1123,7 +1123,7 @@ namespace DEPCFG
|
||||||
result.CfgFile=
|
result.CfgFile=
|
||||||
"// Auto generated config file\n"
|
"// Auto generated config file\n"
|
||||||
"// Use with commandline: "+theApp.CmdLine+"\n"
|
"// Use with commandline: "+theApp.CmdLine+"\n"
|
||||||
"AESAliasName= \""+appName+"\";\n"
|
"AESAliasName= \"" + appName.c_str() + "\";\n"
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
// copy the cfg set to the result record (the cfgAfter set should have been merged in already)
|
// copy the cfg set to the result record (the cfgAfter set should have been merged in already)
|
||||||
|
|
|
@ -139,10 +139,10 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent)
|
||||||
bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uint32 idx)
|
bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uint32 idx)
|
||||||
{
|
{
|
||||||
// check value of 'idx'
|
// check value of 'idx'
|
||||||
BOMB_IF(parent!=NULL && idx>1024*1024,"Implausibly high number of children requested ("+NLMISC::toString("%d",idx)+") for persistent data tree node: "+parent->getNodeName(),return false);
|
BOMB_IF(parent != NULL && idx>1024 * 1024, "Implausibly high number of children requested (" + NLMISC::toString("%d", idx) + ") for persistent data tree node: " + parent->getNodeName().c_str(), return false);
|
||||||
|
|
||||||
// check for attachment to previous parent
|
// check for attachment to previous parent
|
||||||
BOMB_IF(_Parent!=NULL,"Attempting to attach a persistent data node to parent '"+(parent==NULL?"NULL":parent->getNodeName())+"' when it's already attached to another parent as: "+getNodeName(),return false);
|
BOMB_IF(_Parent != NULL, "Attempting to attach a persistent data node to parent '" + (parent == NULL ? "NULL" : parent->getNodeName()) + "' when it's already attached to another parent as: " + getNodeName().c_str(), return false);
|
||||||
|
|
||||||
// split the name into its component parts
|
// split the name into its component parts
|
||||||
CSString mapIndex= _Name;
|
CSString mapIndex= _Name;
|
||||||
|
@ -159,7 +159,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin
|
||||||
if (parent!=NULL)
|
if (parent!=NULL)
|
||||||
{
|
{
|
||||||
// check parent isn't a value
|
// check parent isn't a value
|
||||||
BOMB_IF(parent->_IsValue,"Attempting to attach a persistent data node to parent that has a value '"+parent->getNodeName()+"' = "+parent->_Value,return false);
|
BOMB_IF(parent->_IsValue, "Attempting to attach a persistent data node to parent that has a value '" + parent->getNodeName() + "' = " + parent->_Value.c_str(), return false);
|
||||||
|
|
||||||
if (hasExplicitIndex)
|
if (hasExplicitIndex)
|
||||||
{
|
{
|
||||||
|
@ -179,7 +179,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure that there isn't already a node with the same '#' value attached to the same parent
|
// ensure that there isn't already a node with the same '#' value attached to the same parent
|
||||||
DROP_IF(parent->_ChildIndex.find(nameBase+'#'+mapIndex)!=parent->_ChildIndex.end(),"Failed to add child '"+_Name+"' to parent '"+parent->getNodeName()+"' because another child of same name already exists",return false);
|
DROP_IF(parent->_ChildIndex.find(nameBase + '#' + mapIndex.c_str()) != parent->_ChildIndex.end(), "Failed to add child '" + _Name + "' to parent '" + parent->getNodeName().c_str() + "' because another child of same name already exists", return false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasExplicitIndex)
|
if (!hasExplicitIndex)
|
||||||
|
@ -190,7 +190,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin
|
||||||
}
|
}
|
||||||
|
|
||||||
// construct our cleaned up name from its constituent parts
|
// construct our cleaned up name from its constituent parts
|
||||||
_Name= nameBase+'#'+mapIndex;
|
_Name = nameBase + '#' + mapIndex.c_str();
|
||||||
|
|
||||||
// setup own _Parent property and ensure that there are no trailing spaces round the _Name
|
// setup own _Parent property and ensure that there are no trailing spaces round the _Name
|
||||||
_Parent= parent;
|
_Parent= parent;
|
||||||
|
@ -205,7 +205,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure that there isn't another child already assigned to this parent slot
|
// ensure that there isn't another child already assigned to this parent slot
|
||||||
BOMB_IF(_Parent->_Children[idx]!=NULL,"Ignoring attempt to add second child to same slot ("+NLMISC::toString("%d",idx)+") in persistent data tree node's children: "+_Parent->getNodeName(),return false);
|
BOMB_IF(_Parent->_Children[idx] != NULL, "Ignoring attempt to add second child to same slot (" + NLMISC::toString("%d", idx) + ") in persistent data tree node's children: " + _Parent->getNodeName().c_str(), return false);
|
||||||
|
|
||||||
// write own pointer into parent's _Children vector
|
// write own pointer into parent's _Children vector
|
||||||
_Parent->_Children[idx]= this;
|
_Parent->_Children[idx]= this;
|
||||||
|
@ -239,7 +239,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// pop the end of block token for the block we just finished processing
|
// pop the end of block token for the block we just finished processing
|
||||||
DROP_IF(pdr.peekNextToken()!=token,"ERROR: End of "+pdr.lookupString(token)+" block expected but not found at: "+getNodeName(),return false);
|
DROP_IF(pdr.peekNextToken() != token, "ERROR: End of " + pdr.lookupString(token) + " block expected but not found at: " + getNodeName().c_str(), return false);
|
||||||
pdr.popStructEnd(token);
|
pdr.popStructEnd(token);
|
||||||
}
|
}
|
||||||
else if (pdr.isEndOfStruct())
|
else if (pdr.isEndOfStruct())
|
||||||
|
@ -259,7 +259,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr)
|
||||||
// extract the map key and ensure that it's followed by a valid __Val__ entry
|
// extract the map key and ensure that it's followed by a valid __Val__ entry
|
||||||
CSString mapKey;
|
CSString mapKey;
|
||||||
pdr.pop(mapKeyToken,mapKey);
|
pdr.pop(mapKeyToken,mapKey);
|
||||||
DROP_IF(pdr.isEndOfData() || pdr.peekNextToken()!=mapValToken,"ERROR: Ignoring map key (__Key__) because __Val__ token expected but not found at: "+getNodeName()+":"+mapKey,continue);
|
DROP_IF(pdr.isEndOfData() || pdr.peekNextToken() != mapValToken, "ERROR: Ignoring map key (__Key__) because __Val__ token expected but not found at: " + getNodeName() + ":" + mapKey.c_str(), continue);
|
||||||
if (needsQuotes(mapKey))
|
if (needsQuotes(mapKey))
|
||||||
mapKey=mapKey.quote();
|
mapKey=mapKey.quote();
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// pop the end of struct marker
|
// pop the end of struct marker
|
||||||
DROP_IF(pdr.peekNextToken()!=mapValToken,"ERROR: End of __Val__ block expected but not found at: "+getNodeName()+":"+mapKey,return false);
|
DROP_IF(pdr.peekNextToken() != mapValToken, "ERROR: End of __Val__ block expected but not found at: " + getNodeName() + ":" + mapKey.c_str(), return false);
|
||||||
pdr.popStructEnd(mapValToken);
|
pdr.popStructEnd(mapValToken);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -419,9 +419,9 @@ bool CPersistentDataTreeNode::writeToBuffer(NLMISC::CSString& buffer) const
|
||||||
{
|
{
|
||||||
// write a value
|
// write a value
|
||||||
if (needsQuotes(_Value))
|
if (needsQuotes(_Value))
|
||||||
buffer+= getNodeName()+"=="+_Value.quote()+"\n";
|
buffer += getNodeName() + "==" + _Value.quote().c_str() + "\n";
|
||||||
else
|
else
|
||||||
buffer+= getNodeName()+"="+_Value+"\n";
|
buffer += getNodeName() + "=" + _Value.c_str() + "\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -468,8 +468,8 @@ CSString CPersistentDataTreeNode::getNodeName() const
|
||||||
|
|
||||||
// return one of name, parentName.name and parentName:name
|
// return one of name, parentName.name and parentName:name
|
||||||
if (parentName.empty()) return name;
|
if (parentName.empty()) return name;
|
||||||
if (isMapEntry()) return parentName+":"+name;
|
if (isMapEntry()) return parentName + ":" + name.c_str();
|
||||||
else return parentName+"."+name;
|
else return parentName + "." + name.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPersistentDataTreeNode::setValue(const TValue& value)
|
void CPersistentDataTreeNode::setValue(const TValue& value)
|
||||||
|
@ -507,7 +507,7 @@ bool CPersistentDataTreeNode::isMapEntry() const
|
||||||
|
|
||||||
bool CPersistentDataTreeNode::flagAsMap()
|
bool CPersistentDataTreeNode::flagAsMap()
|
||||||
{
|
{
|
||||||
DROP_IF(_IsValue,"ERROR: Failed to flag persistent data tree node '"+getNodeName()+"' as a map as it already has a value: "+_Value,return false);
|
DROP_IF(_IsValue, "ERROR: Failed to flag persistent data tree node '" + getNodeName() + "' as a map as it already has a value: " + _Value.c_str(), return false);
|
||||||
|
|
||||||
if (_IsMap)
|
if (_IsMap)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1017,7 +1017,7 @@ IPrimitive* CServerAnimationModule::getAction(CObject* action, const std::string
|
||||||
}
|
}
|
||||||
|
|
||||||
if(result.size()>=2)
|
if(result.size()>=2)
|
||||||
result[1] = "DSS_"+toString(scenarioId)+" "+result[1];
|
result[1] = "DSS_"+toString(scenarioId)+" "+result[1].c_str();
|
||||||
if(result.size()>=3)
|
if(result.size()>=3)
|
||||||
{
|
{
|
||||||
for(uint32 i=2;i<result.size();++i)
|
for(uint32 i=2;i<result.size();++i)
|
||||||
|
|
Loading…
Reference in a new issue