AC_CXX_OPTION(-Wuninitialized,CXXFLAGS)
CXXFLAGS="$CXXFLAGS -O "
else
- CFLAGS="$CFLAGS -O -g"
- CXXFLAGS="$CXXFLAGS -O -g"
+ CFLAGS="$CFLAGS -g"
+ CXXFLAGS="$CXXFLAGS -g"
fi
])
if(_node->_attributes.find(theAttribute->ID()) != _node->_attributes.end()) return false;
theAttribute->_node = _node;
_node->_attributes[theAttribute->ID()] = theAttribute;
+ theAttribute->AfterAddition();
return true;
}
if(_node->_attributes.find(theID) == _node->_attributes.end()) return false;
DF_Attribute* attr = _node->_attributes[theID];
+ attr->BeforeForget();
_node->_attributes.erase(theID);
delete attr;
vector<DF_Attribute*> va = GetAttributes();
_node->_attributes.clear();
- for(int i = 0, len = va.size(); i<len; i++)
+ for(int i = 0, len = va.size(); i<len; i++) {
+ va[i]->BeforeForget();
delete va[i];
+ }
if(clearChildren) {
DF_ChildIterator CI(*this, true);
return self._ComponentDataType
def Save(self, theComponent, theURL, isMultiFile):
- return NULL
+ return ""
def SaveASCII(self, theComponent, theURL, isMultiFile):
return self.Save(theComponent, theURL, isMultiFile)
return 1
def PublishInStudy(self, theStudy, theSObject, theObject, theName):
- return NULL
+ return None
def CanCopy(self, theObject):
return 0
std::string aString(theString);
int aPos = aString.find(SEPARATOR);
if(aPos < 1) return aString;
- if(aPos == 1) return std::string();
+ if(aPos == 0) return std::string();
return aString.substr(0, aPos);
}
{
std::string aString(theString);
int aPos = aString.find(SEPARATOR);
- if(aPos < 1) return aString;
- if(aPos == 1) return std::string();
+ if(aPos < 0) return aString;
+ if(aPos == 0) return std::string();
return aString.substr(0, aPos);
}
std::string aString(theString);
int aPos = aString.find(SEPARATOR);
if(aPos < 1) return aString;
- if(aPos == 1) return std::string();
+ if(aPos == 0) return std::string();
return aString.substr(0, aPos);
}
string SALOMEDSImpl_AttributeTreeNode::Type()
{
- char* aNodeName = new char[60];
+ char* aNodeName = new char[127];
sprintf(aNodeName, "AttributeTreeNodeGUID%s", ID().c_str());
string ret(aNodeName);
delete aNodeName;
string SALOMEDSImpl_AttributeUserID::Type()
{
- char* aUAttrName = new char[60];
+ char* aUAttrName = new char[127];
sprintf(aUAttrName, "AttributeUserID_%s",ID().c_str());
string ret(aUAttrName);