mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Changed: Use std::string instead of const char*
--HG-- branch : develop
This commit is contained in:
parent
0a4ce7e4e1
commit
6978dc9bee
10 changed files with 44 additions and 44 deletions
|
@ -382,7 +382,7 @@ void scanFiles(const CSString &filespec)
|
||||||
UFormElm *fieldForm=NULL;
|
UFormElm *fieldForm=NULL;
|
||||||
std::string valueString;
|
std::string valueString;
|
||||||
|
|
||||||
form->getRootNode ().getNodeByName(&fieldForm, fields[i]._name.c_str());
|
form->getRootNode ().getNodeByName(&fieldForm, fields[i]._name);
|
||||||
|
|
||||||
if (fieldForm)
|
if (fieldForm)
|
||||||
{
|
{
|
||||||
|
@ -1026,7 +1026,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
|
||||||
|
|
||||||
const UFormElm *fieldForm=NULL;
|
const UFormElm *fieldForm=NULL;
|
||||||
|
|
||||||
if (rootForm.getNodeByName(&fieldForm, var.c_str()))
|
if (rootForm.getNodeByName(&fieldForm, var))
|
||||||
{
|
{
|
||||||
UFormDfn *dfnForm=const_cast<UFormElm&>(rootForm).getStructDfn();
|
UFormDfn *dfnForm=const_cast<UFormElm&>(rootForm).getStructDfn();
|
||||||
nlassert(dfnForm);
|
nlassert(dfnForm);
|
||||||
|
|
|
@ -541,7 +541,7 @@ void CAnimationSetSheet::build(const NLGEORGES::UFormElm &rootElmt)
|
||||||
nlinfo("%2d state '%s' :", i, stateName.c_str());
|
nlinfo("%2d state '%s' :", i, stateName.c_str());
|
||||||
|
|
||||||
const UFormElm *elmt = 0;
|
const UFormElm *elmt = 0;
|
||||||
if(rootElmt.getNodeByName(&elmt, stateName.c_str()))
|
if(rootElmt.getNodeByName(&elmt, stateName))
|
||||||
{
|
{
|
||||||
bool animPresent = false;
|
bool animPresent = false;
|
||||||
if(elmt)
|
if(elmt)
|
||||||
|
|
|
@ -62,7 +62,7 @@ void CMissionSheet::build(const NLGEORGES::UFormElm &item)
|
||||||
{
|
{
|
||||||
const UFormElm * stepStruct;
|
const UFormElm * stepStruct;
|
||||||
string varName = string("step") + NLMISC::toString(i);
|
string varName = string("step") + NLMISC::toString(i);
|
||||||
item.getNodeByName (&stepStruct, varName.c_str());
|
item.getNodeByName (&stepStruct, varName);
|
||||||
|
|
||||||
if (stepStruct)
|
if (stepStruct)
|
||||||
{
|
{
|
||||||
|
|
|
@ -235,7 +235,7 @@ CActionString::CActionString (IAction::TTypeAction type, const std::string &newV
|
||||||
bool vdfnArray;
|
bool vdfnArray;
|
||||||
CForm *form=doc.getFormPtr ();
|
CForm *form=doc.getFormPtr ();
|
||||||
CFormElm *elm = doc.getRootNode (slot);
|
CFormElm *elm = doc.getRootNode (slot);
|
||||||
nlverify ( elm->getNodeByName (_FormName.c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (_FormName, &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, vdfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, vdfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
|
@ -364,7 +364,7 @@ bool CActionString::doAction (CGeorgesEditDoc &doc, bool redo, bool &modified, b
|
||||||
bool parentVDnfArray;
|
bool parentVDnfArray;
|
||||||
CForm *form=doc.getFormPtr ();
|
CForm *form=doc.getFormPtr ();
|
||||||
CFormElm *elm = doc.getRootNode (_Slot);
|
CFormElm *elm = doc.getRootNode (_Slot);
|
||||||
nlverify ( elm->getNodeByName (_FormName.c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (_FormName, &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, parentVDnfArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, parentVDnfArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
nlassert (node);
|
nlassert (node);
|
||||||
CFormElmAtom *atom = safe_cast<CFormElmAtom*> (node);
|
CFormElmAtom *atom = safe_cast<CFormElmAtom*> (node);
|
||||||
|
@ -437,14 +437,14 @@ bool CActionString::doAction (CGeorgesEditDoc &doc, bool redo, bool &modified, b
|
||||||
bool vdfnArray;
|
bool vdfnArray;
|
||||||
CForm *form=doc.getFormPtr ();
|
CForm *form=doc.getFormPtr ();
|
||||||
CFormElm *elm = doc.getRootNode (_Slot);
|
CFormElm *elm = doc.getRootNode (_Slot);
|
||||||
nlverify ( elm->getNodeByName (_FormName.c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (_FormName, &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, vdfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, vdfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
CFormElmArray* array = safe_cast<CFormElmArray*> (node->getParent ());
|
CFormElmArray* array = safe_cast<CFormElmArray*> (node->getParent ());
|
||||||
array->Elements[idInParent].Name = _Value[index];
|
array->Elements[idInParent].Name = _Value[index];
|
||||||
modified = true;
|
modified = true;
|
||||||
update (true, DoNothing, doc, _FormName.c_str ());
|
update (true, DoNothing, doc, _FormName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -716,14 +716,14 @@ bool CActionStringVector::doAction (CGeorgesEditDoc &doc, bool redo, bool &modif
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc.getFormPtr ();
|
CForm *form=doc.getFormPtr ();
|
||||||
CFormElm *elm = doc.getRootNode (slot);
|
CFormElm *elm = doc.getRootNode (slot);
|
||||||
nlverify ( elm->getNodeByName (_FormName.c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true) );
|
nlverify ( elm->getNodeByName (_FormName, &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true) );
|
||||||
|
|
||||||
// Is a type entry ?
|
// Is a type entry ?
|
||||||
if ((type == UFormDfn::EntryType) && array)
|
if ((type == UFormDfn::EntryType) && array)
|
||||||
{
|
{
|
||||||
// Create the array
|
// Create the array
|
||||||
bool created;
|
bool created;
|
||||||
nlverify ( elm->createNodeByName (_FormName.c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, created) );
|
nlverify ( elm->createNodeByName (_FormName, &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, created) );
|
||||||
nlassert (node);
|
nlassert (node);
|
||||||
|
|
||||||
// Get the atom
|
// Get the atom
|
||||||
|
@ -921,7 +921,7 @@ bool CActionStringVectorVector::doAction (CGeorgesEditDoc &doc, bool redo, bool
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
CActionBuffer::CActionBuffer (IAction::TTypeAction type, const uint8 *buffer, uint bufferSize, CGeorgesEditDoc &doc, const char *formName, const char *userData, uint selId, uint slot) : IAction (type, selId, slot)
|
CActionBuffer::CActionBuffer(IAction::TTypeAction type, const uint8 *buffer, uint bufferSize, CGeorgesEditDoc &doc, const std::string &formName, const std::string &userData, uint selId, uint slot) : IAction(type, selId, slot)
|
||||||
{
|
{
|
||||||
// New value
|
// New value
|
||||||
_FormName = formName;
|
_FormName = formName;
|
||||||
|
|
|
@ -548,7 +548,7 @@ void CFormDialog::setToDocument (uint widget)
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (Widgets[widget]->getSlot ());
|
CFormElm *elm = doc->getRootNode (Widgets[widget]->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (Widgets[widget]->getFormName ().c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (Widgets[widget]->getFormName (), &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Must create array or virtual dfn ?
|
// Must create array or virtual dfn ?
|
||||||
|
@ -811,7 +811,7 @@ BOOL CFormDialog::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (Widgets[widgetId]->getSlot ());
|
CFormElm *elm = doc->getRootNode (Widgets[widgetId]->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (Widgets[widgetId]->getFormName ().c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (Widgets[widgetId]->getFormName (), &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
nlassert (parentDfn);
|
nlassert (parentDfn);
|
||||||
|
|
||||||
|
@ -943,7 +943,7 @@ BOOL CFormDialog::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
|
||||||
|
|
||||||
// Search for the node
|
// Search for the node
|
||||||
nlverify ((const CFormElm*)(doc->getRootNode (Widgets[i]->getSlot ()))->getNodeByName
|
nlverify ((const CFormElm*)(doc->getRootNode (Widgets[i]->getSlot ()))->getNodeByName
|
||||||
(Widgets[i]->getFormName ().c_str (), &parentDfn, lastElement, &nodeDfn, &nodeType,
|
(Widgets[i]->getFormName (), &parentDfn, lastElement, &nodeDfn, &nodeType,
|
||||||
&node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
&node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
||||||
|
|
||||||
// Todo: multiply here by the spinner precision
|
// Todo: multiply here by the spinner precision
|
||||||
|
@ -1097,7 +1097,7 @@ void CFormDialog::getFromDocument ()
|
||||||
UFormDfn::TEntryType type;
|
UFormDfn::TEntryType type;
|
||||||
|
|
||||||
// Search for the node
|
// Search for the node
|
||||||
nlverify (((const CFormElm*)(doc->getRootNode (subObject->getSlot ())))->getNodeByName (subObject->getFormName ().c_str (), &parentDfn, lastElement, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
nlverify (((const CFormElm*)(doc->getRootNode (subObject->getSlot ())))->getNodeByName (subObject->getFormName (), &parentDfn, lastElement, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
||||||
|
|
||||||
// Should have a parent DFN, else it is the root element
|
// Should have a parent DFN, else it is the root element
|
||||||
if (parentDfn)
|
if (parentDfn)
|
||||||
|
@ -1342,7 +1342,7 @@ void IFormWidget::updateLabel ()
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (getSlot ());
|
CFormElm *elm = doc->getRootNode (getSlot ());
|
||||||
nlverify ( elm->getNodeByName (FormName.c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (FormName, &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Does the node exist ?
|
// Does the node exist ?
|
||||||
|
@ -1401,7 +1401,7 @@ bool IFormWidget::getNode (const CFormDfn **parentDfn, uint &lastElement, const
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (getSlot ());
|
CFormElm *elm = doc->getRootNode (getSlot ());
|
||||||
return (elm->getNodeByName (FormName.c_str (), parentDfn,
|
return (elm->getNodeByName (FormName, parentDfn,
|
||||||
lastElement, nodeDfn, nodeType, node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
lastElement, nodeDfn, nodeType, node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1558,7 +1558,7 @@ void CFormMemCombo::create (DWORD wStyle, RECT ¤tPos, CFormDialog *parent,
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (getSlot ());
|
CFormElm *elm = doc->getRootNode (getSlot ());
|
||||||
nlverify ( elm->getNodeByName (FormName.c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (FormName, &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
FirstId = dialog_index;
|
FirstId = dialog_index;
|
||||||
|
@ -1710,7 +1710,7 @@ void CFormMemCombo::getFromDocument (CForm &form)
|
||||||
UFormDfn::TEntryType type;
|
UFormDfn::TEntryType type;
|
||||||
bool array;
|
bool array;
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
nlverify (((const CFormElm*)doc->getRootNode(getSlot ()))->getNodeByName (FormName.c_str(), &parentDfn, lastElement, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
nlverify (((const CFormElm*)doc->getRootNode(getSlot ()))->getNodeByName (FormName, &parentDfn, lastElement, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
||||||
nlassert (array);
|
nlassert (array);
|
||||||
|
|
||||||
// Node exist ?
|
// Node exist ?
|
||||||
|
@ -1743,7 +1743,7 @@ void CFormMemCombo::getFromDocument (CForm &form)
|
||||||
UFormDfn::TEntryType type;
|
UFormDfn::TEntryType type;
|
||||||
bool array;
|
bool array;
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
nlverify (((const CFormElm*)doc->getRootNode (getSlot ()))->getNodeByName (FormName.c_str(), &parentDfn, lastElement, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
nlverify (((const CFormElm*)doc->getRootNode (getSlot ()))->getNodeByName (FormName, &parentDfn, lastElement, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND));
|
||||||
nlassert (!array);
|
nlassert (!array);
|
||||||
|
|
||||||
// Node exist ?
|
// Node exist ?
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ void CGeorgesEditApp::OnUpdateFileSaveAll(CCmdUI* pCmdUI)
|
||||||
pCmdUI->Enable (getActiveDocument () != NULL);
|
pCmdUI->Enable (getActiveDocument () != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGeorgesEditApp::SerialIntoMemStream (const char *formName, CGeorgesEditDoc *doc, uint slot, bool copyToClipboard)
|
bool CGeorgesEditApp::SerialIntoMemStream (const std::string &formName, CGeorgesEditDoc *doc, uint slot, bool copyToClipboard)
|
||||||
{
|
{
|
||||||
// Ok, get the node
|
// Ok, get the node
|
||||||
const CFormDfn *parentDfn;
|
const CFormDfn *parentDfn;
|
||||||
|
@ -1228,7 +1228,7 @@ bool CGeorgesEditApp::FillMemStreamWithClipboard (const char *formName, CGeorges
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGeorgesEditApp::SerialFromMemStream (const char *formName, CGeorgesEditDoc *doc, uint slot)
|
bool CGeorgesEditApp::SerialFromMemStream (const std::string &formName, CGeorgesEditDoc *doc, uint slot)
|
||||||
{
|
{
|
||||||
// The form pointer
|
// The form pointer
|
||||||
CForm *form = doc->getFormPtr ();
|
CForm *form = doc->getFormPtr ();
|
||||||
|
|
|
@ -119,11 +119,11 @@ public:
|
||||||
public:
|
public:
|
||||||
// Memory stream
|
// Memory stream
|
||||||
NLMISC::CMemStream MemStream;
|
NLMISC::CMemStream MemStream;
|
||||||
bool FillMemStreamWithClipboard (const char *formName, CGeorgesEditDoc *doc, uint slot);
|
bool FillMemStreamWithClipboard (const std::string &formName, CGeorgesEditDoc *doc, uint slot);
|
||||||
void FillMemStreamWithBuffer (const uint8 *buffer, uint size);
|
void FillMemStreamWithBuffer (const uint8 *buffer, uint size);
|
||||||
|
|
||||||
bool SerialIntoMemStream (const char *formName, CGeorgesEditDoc *doc, uint slot, bool copyToClipboard);
|
bool SerialIntoMemStream (const std::string &formName, CGeorgesEditDoc *doc, uint slot, bool copyToClipboard);
|
||||||
bool SerialFromMemStream (const char *formName, CGeorgesEditDoc *doc, uint slot);
|
bool SerialFromMemStream (const std::string &formName, CGeorgesEditDoc *doc, uint slot);
|
||||||
|
|
||||||
// Init
|
// Init
|
||||||
BOOL initInstance (int nCmdShow, bool exeStandalone, int x, int y, int cx, int cy);
|
BOOL initInstance (int nCmdShow, bool exeStandalone, int x, int y, int cx, int cy);
|
||||||
|
@ -136,7 +136,7 @@ public:
|
||||||
|
|
||||||
// From IEdit
|
// From IEdit
|
||||||
NLGEORGES::IEditDocument *getActiveDocument ();
|
NLGEORGES::IEditDocument *getActiveDocument ();
|
||||||
NLGEORGES::IEditDocument *createDocument (const char *dfnName, const char *pathName);
|
NLGEORGES::IEditDocument *createDocument (const std::string &dfnName, const std::string &pathName);
|
||||||
virtual void getSearchPath (std::string &searchPath);
|
virtual void getSearchPath (std::string &searchPath);
|
||||||
virtual NLMISC::CConfigFile &getConfigFile() { return ConfigFile; }
|
virtual NLMISC::CConfigFile &getConfigFile() { return ConfigFile; }
|
||||||
|
|
||||||
|
@ -153,10 +153,10 @@ public:
|
||||||
CImageListEx ImageList;
|
CImageListEx ImageList;
|
||||||
|
|
||||||
// Get a template form
|
// Get a template form
|
||||||
CMultiDocTemplate *getFormDocTemplate (const char *dfnName);
|
CMultiDocTemplate *getFormDocTemplate (const std::string &dfnName);
|
||||||
|
|
||||||
void saveWindowState (const CWnd *wnd, const char *name, bool controlBar);
|
void saveWindowState (const CWnd *wnd, const std::string &name, bool controlBar);
|
||||||
void loadWindowState (CWnd *wnd, const char *name, bool changeShowWindow, bool controlBar);
|
void loadWindowState (CWnd *wnd, const std::string &name, bool changeShowWindow, bool controlBar);
|
||||||
|
|
||||||
// Overrides
|
// Overrides
|
||||||
// ClassWizard generated virtual function overrides
|
// ClassWizard generated virtual function overrides
|
||||||
|
@ -176,8 +176,8 @@ public:
|
||||||
void releasePlugins ();
|
void releasePlugins ();
|
||||||
|
|
||||||
// Dialog function
|
// Dialog function
|
||||||
void outputError (const char* message);
|
void outputError (const std::string &message);
|
||||||
bool yesNo (const char* message);
|
bool yesNo (const std::string &message);
|
||||||
bool getColor (NLMISC::CRGBA &color);
|
bool getColor (NLMISC::CRGBA &color);
|
||||||
|
|
||||||
// Browse an URL
|
// Browse an URL
|
||||||
|
|
|
@ -355,7 +355,7 @@ CGeorgesEditDocSub *CGeorgesEditDoc::addStruct (CGeorgesEditDocSub *parent, CFor
|
||||||
{
|
{
|
||||||
// Get the node by name
|
// Get the node by name
|
||||||
UFormElm *uNode;
|
UFormElm *uNode;
|
||||||
if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName.c_str(), NULL, false) && uNode)
|
if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName, NULL, false) && uNode)
|
||||||
{
|
{
|
||||||
nextArray = safe_cast<CFormElmArray*> (uNode);
|
nextArray = safe_cast<CFormElmArray*> (uNode);
|
||||||
}
|
}
|
||||||
|
@ -382,7 +382,7 @@ CGeorgesEditDocSub *CGeorgesEditDoc::addStruct (CGeorgesEditDocSub *parent, CFor
|
||||||
{
|
{
|
||||||
// Get the node by name
|
// Get the node by name
|
||||||
UFormElm *uNode;
|
UFormElm *uNode;
|
||||||
if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName.c_str(), NULL, false) && uNode)
|
if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName, NULL, false) && uNode)
|
||||||
{
|
{
|
||||||
nextForm = safe_cast<CFormElmStruct*> (uNode);
|
nextForm = safe_cast<CFormElmStruct*> (uNode);
|
||||||
}
|
}
|
||||||
|
@ -414,7 +414,7 @@ CGeorgesEditDocSub *CGeorgesEditDoc::addStruct (CGeorgesEditDocSub *parent, CFor
|
||||||
{
|
{
|
||||||
// Get the node by name
|
// Get the node by name
|
||||||
UFormElm *uNode;
|
UFormElm *uNode;
|
||||||
if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName.c_str(), NULL, false) && uNode)
|
if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName, NULL, false) && uNode)
|
||||||
{
|
{
|
||||||
nextArray = safe_cast<CFormElmArray*> (uNode);
|
nextArray = safe_cast<CFormElmArray*> (uNode);
|
||||||
}
|
}
|
||||||
|
@ -1546,7 +1546,7 @@ int CGeorgesEditDocSub::getItemImage (CGeorgesEditDoc *doc) const
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (getSlot ());
|
CFormElm *elm = doc->getRootNode (getSlot ());
|
||||||
nlverify ( elm->getNodeByName (getFormName ().c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
nlverify ( elm->getNodeByName (getFormName (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
if (array)
|
if (array)
|
||||||
{
|
{
|
||||||
|
|
|
@ -248,7 +248,7 @@ void CGeorgesImpl::PutGroupText (const std::vector<std::string>& _vText, bool ap
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (subDoc->getFormName ().c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
nlverify ( elm->getNodeByName (subDoc->getFormName (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is a type entry ?
|
// Is a type entry ?
|
||||||
if ((type == UFormDfn::EntryType) && array)
|
if ((type == UFormDfn::EntryType) && array)
|
||||||
|
@ -314,7 +314,7 @@ void CGeorgesImpl::PutText (const std::string& _sText)
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (subDoc->getFormName ().c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
nlverify ( elm->getNodeByName (subDoc->getFormName (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// It is an array ?
|
// It is an array ?
|
||||||
if (array&&(type == UFormDfn::EntryType))
|
if (array&&(type == UFormDfn::EntryType))
|
||||||
|
@ -374,7 +374,7 @@ void CGeorgesImpl::LineUp ()
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (subDoc->getFormName ().c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
nlverify ( elm->getNodeByName (subDoc->getFormName (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is a type entry ?
|
// Is a type entry ?
|
||||||
if ( (type == UFormDfn::EntryType) && !array )
|
if ( (type == UFormDfn::EntryType) && !array )
|
||||||
|
@ -417,7 +417,7 @@ void CGeorgesImpl::LineDown ()
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
CFormElm *elm = doc->getRootNode (subDoc->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (subDoc->getFormName ().c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
nlverify ( elm->getNodeByName (subDoc->getFormName (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is a type entry ?
|
// Is a type entry ?
|
||||||
if ( (type == UFormDfn::EntryType) && !array )
|
if ( (type == UFormDfn::EntryType) && !array )
|
||||||
|
|
|
@ -289,7 +289,7 @@ BOOL CLeftView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (parent->getFormName ().c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (parent->getFormName (), &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is a non empty array ?
|
// Is a non empty array ?
|
||||||
|
@ -343,7 +343,7 @@ BOOL CLeftView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (parent->getFormName ().c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (parent->getFormName (), &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is a non empty array ?
|
// Is a non empty array ?
|
||||||
|
@ -430,7 +430,7 @@ BOOL CLeftView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (parent->getFormName ().c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (parent->getFormName (), &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is the parent array ?
|
// Is the parent array ?
|
||||||
|
@ -849,7 +849,7 @@ void CLeftView::OnInsert()
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (parent->getFormName ().c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (parent->getFormName (), &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is a non empty array ?
|
// Is a non empty array ?
|
||||||
|
@ -911,7 +911,7 @@ void CLeftView::OnDelete()
|
||||||
bool parentVDfnArray;
|
bool parentVDfnArray;
|
||||||
CForm *form=doc->getFormPtr ();
|
CForm *form=doc->getFormPtr ();
|
||||||
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
CFormElm *elm = (CFormElm *)doc->getRootNode (subObject->getSlot ());
|
||||||
nlverify ( elm->getNodeByName (parent->getFormName ().c_str (), &parentDfn, indexDfn,
|
nlverify ( elm->getNodeByName (parent->getFormName (), &parentDfn, indexDfn,
|
||||||
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
&nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );
|
||||||
|
|
||||||
// Is a non empty array ?
|
// Is a non empty array ?
|
||||||
|
|
Loading…
Reference in a new issue