Commit 81ae574b authored by claes's avatar claes

Function to keep name of extern references in dumpfile

parent eab989b1
...@@ -21,6 +21,7 @@ wb_print_wbl::wb_print_wbl(ostream& os, int levelIndentation) : ...@@ -21,6 +21,7 @@ wb_print_wbl::wb_print_wbl(ostream& os, int levelIndentation) :
m_idxFlag(true), m_idxFlag(true),
m_level(0), m_level(0),
m_levelInd(levelIndentation), m_levelInd(levelIndentation),
m_keepName(false),
m_os(os) m_os(os)
{ {
memset(m_indBuf, ' ', sizeof(m_indBuf)); memset(m_indBuf, ' ', sizeof(m_indBuf));
...@@ -493,8 +494,13 @@ bool wb_print_wbl::printValue (wb_volume& v, ...@@ -493,8 +494,13 @@ bool wb_print_wbl::printValue (wb_volume& v,
sprintf(sval, "0"); sprintf(sval, "0");
else { else {
o = v.object(*(pwr_tOid *)val); o = v.object(*(pwr_tOid *)val);
if (o) if (o) {
sprintf(sval, "\"%s\"", o.longName().c_str()); if ( o.oid().vid >= cdh_cUserVolMin && o.oid().vid != v.vid() && !m_keepName)
// Other user volume. Loadfile might not be created yet at load time.
sprintf(sval, "\"%s\"", cdh_ObjidToString(NULL, *(pwr_tObjid *)val, 1));
else
sprintf(sval, "\"%s\"", o.longName().c_str());
}
else else
sprintf(sval, "\"%s\"", cdh_ObjidToString(NULL, *(pwr_tObjid *)val, 1)); sprintf(sval, "\"%s\"", cdh_ObjidToString(NULL, *(pwr_tObjid *)val, 1));
} }
......
...@@ -27,6 +27,7 @@ protected: ...@@ -27,6 +27,7 @@ protected:
int m_level; int m_level;
int m_levelInd; int m_levelInd;
char m_indBuf[256]; char m_indBuf[256];
bool m_keepName;
ostream& m_os; ostream& m_os;
...@@ -71,6 +72,7 @@ public: ...@@ -71,6 +72,7 @@ public:
int getErrCnt() const { return m_errCnt;} int getErrCnt() const { return m_errCnt;}
void resetErrCnt() {m_errCnt = 0; } void resetErrCnt() {m_errCnt = 0; }
void keepName() { m_keepName = true;}
void printHierarchy(wb_volume& v, wb_object& o); //< Prints a hierarchy void printHierarchy(wb_volume& v, wb_object& o); //< Prints a hierarchy
void printObject(wb_volume& v, wb_object& o, bool recursive = true); //< Prints an object void printObject(wb_volume& v, wb_object& o, bool recursive = true); //< Prints an object
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment