ciao.
Ho un altro problema coi costruttori sullo stesso procedimento:
a volte capita che una classe abbia i costruttori più disparati che servono per creare l'oggetto ad es:
codice:
base_IfcBuildingElement::
base_IfcBuildingElement ()
: ::ifcXML::IFC2x3::FINAL::IfcElement ()
{
}
base_IfcBuildingElement::
base_IfcBuildingElement (const GlobalId_type& GlobalId,
const OwnerHistory_type& OwnerHistory)
: ::ifcXML::IFC2x3::FINAL::IfcElement (GlobalId,
OwnerHistory)
{
}
base_IfcBuildingElement::
base_IfcBuildingElement (const GlobalId_type& GlobalId,
::std::auto_ptr< OwnerHistory_type >& OwnerHistory)
: ::ifcXML::IFC2x3::FINAL::IfcElement (GlobalId,
OwnerHistory)
{
}
base_IfcBuildingElement::
base_IfcBuildingElement (const base_IfcBuildingElement& x,
::xml_schema::flags f,
::xml_schema::container* c)
: ::ifcXML::IFC2x3::FINAL::IfcElement (x, f, c)
{
}
base_IfcBuildingElement* base_IfcBuildingElement::
_clone (::xml_schema::flags f,
::xml_schema::container* c) const
{
return new class base_IfcBuildingElement (*this, f, c);
}
base_IfcBuildingElement::
~base_IfcBuildingElement ()
{
}
questo costruttore e cosi altri:
codice:
base_IfcBuildingElement::
base_IfcBuildingElement (const GlobalId_type& GlobalId,
const OwnerHistory_type& OwnerHistory)
: ::ifcXML::IFC2x3::FINAL::IfcElement (GlobalId,
OwnerHistory)
{
}
classe wrapper:
codice:
template < class T >
class Wrapper : public T
{
public:
Wrapper (): T(){};
Wrapper (const ::xercesc::DOMElement& e,
::xml_schema::flags f = 0,
::xml_schema::container* c = 0): T (e, f, c){};
Wrapper (const T& x,
::xml_schema::flags f = 0,
::xml_schema::container* c = 0): T (x, f, c){};
void print(){
};
};
non esiste per nulla nella mia classe template Wrapper e neanche posso implementare tutti i costruttori piu disparati(ho 2000 classi).
c'è un modo per risolvere senza cavare tutti i costruttori specifici dalle classi che sono usate per il wrapper?
ps.adesso ho la possibilità di inserire i costruttori di default in tutte le calssi, puo servire?
grazie.