#include <omnithread.h>
#include CORBA_SERVER_HEADER(SALOME_Session)
+#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
#include <qstring.h>
#include <qfileinfo.h>
//static int IS_LOADED = (cout<<"\n----------------- VisuEngine_factory is loaded -----------------\n", 1);
extern "C" {
PortableServer::ObjectId *
- VisuEngine_factory(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId,
+ VISUEngine_factory(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId,
const char *instanceName, const char *interfaceName)
{
if(MYDEBUG) MESSAGE("VisuEngine_factory : "<<interfaceName);
QMutex* Base_i::myMutex = NULL; //apo - &VISUMutex;
CORBA::ORB_var Base_i::myOrb;
PortableServer::POA_var Base_i::myPOA;
+ SALOME_NamingService* Base_i::myNamingService;
+ SALOME_LifeCycleCORBA* Base_i::myEnginesLifeCycle;
+ VISU_Gen_i* Base_i::myVisuGenImpl;
+ VISU_Gen_var Base_i::GetVisuGenInter() { return myVisuGenImpl->_this();}
Base_i::~Base_i() {}
char* Base_i::GetID(){
//CORBA::Object_var anObject = _this();
//apo - auto_ptr<char> aRet(strOut.str());
return strOut.str();
}
+
void Storable::Registry(const char* theComment, TStorableEngine theEngine)
throw(std::logic_error&)
{
throw std::logic_error("Storable::Registry >> dupliacte registring !!!");
}
}
+
void RegistryStorable() throw(std::logic_error&) {
//Storable::Registry(View3D_i::myComment.c_str(),&View3DRestore);
Storable::Registry(Result_i::myComment.c_str(),&ResultRestore);
Storable::Registry(Container_i::myComment.c_str(),&ContainerRestore);
}
- SALOMEDS::SObject_ptr Storable::GetResultSO(SALOMEDS::SObject_ptr theSObject) {
- CORBA::String_var aComponentID(theSObject->GetFatherComponent()->GetID());
- SALOMEDS::SObject_var aResult = SALOMEDS::SObject::_duplicate(theSObject);
- CORBA::String_var aFatherID(aResult->GetFather()->GetID());
- while(strcmp(aComponentID, aFatherID)) {
- aResult = aResult->GetFather();
- aFatherID = aResult->GetFather()->GetID();
- if (strlen(aFatherID) < 3) break;
- }
- return aResult._retn();
- }
-
void Storable::StrToMap(const QString& theStr, VISU::Storable::TRestoringMap& theMap){
- if(MYDEBUG) MESSAGE("Storable::StrToMap : string="<<theStr);
+ if(0 && MYDEBUG) MESSAGE("Storable::StrToMap : string="<<theStr);
QStringList strList = QStringList::split( ";", theStr, false );
for ( int i = 0; i < strList.count(); i++ ) {
QString next = strList[ i ];
//===========================================================================
PortableServer::Servant GetServant(CORBA::Object_ptr theObject){
- PortableServer::POA_var aPOA = GetPOA();
+ PortableServer::POA_ptr aPOA = Base_i::GetPOA();
if(CORBA::is_nil(theObject))
if(MYDEBUG) MESSAGE("GetServant - CORBA::is_nil(theObject)");
return aPOA->reference_to_servant(theObject);
CORBA::Object_var SObjectToObject(SALOMEDS::SObject_ptr theSObject){
SALOMEDS::GenericAttribute_var anAttr;
CORBA::Object_var anObj;
- if(theSObject->FindAttribute(anAttr, "AttributeIOR")){
- SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
- CORBA::String_var aValue = anIOR->Value();
- CORBA::ORB_var anORB = GetORB();
- if(strcmp(aValue,"") != 0)
- anObj = anORB->string_to_object(aValue);
+ try{
+ if(theSObject->FindAttribute(anAttr, "AttributeIOR")){
+ SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
+ CORBA::String_var aValue = anIOR->Value();
+ CORBA::ORB_ptr anORB = Base_i::GetORB();
+ if(strcmp(aValue,"") != 0)
+ anObj = anORB->string_to_object(aValue);
+ }
+ }catch(...){
+ MESSAGE("SObjectToObject - Unknown exception was accured!");
}
return anObj;
}
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
//NRI aName->SetValue("Visu");
- CORBA::ORB_var anORB = GetORB();
+ CORBA::ORB_var anORB = Base_i::GetORB();
SALOME_NamingService *NamingService = new SALOME_NamingService( anORB );
CORBA::Object_var objVarN = NamingService->Resolve("/Kernel/ModulCatalog");
SALOME_ModuleCatalog::ModuleCatalog_var Catalogue = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aPixmap->SetPixMap( "ICON_OBJBROWSER_Visu" );
- VISU_Gen_var aVisuGen = GetVisu();
+ VISU_Gen_var aVisuGen = Base_i::GetVisuGenInter();
aStudyBuilder->DefineComponentInstance(aSComponent,aVisuGen);
if (aLocked) theStudyDocument->GetProperties()->SetLocked(true);
aStudyBuilder->CommitCommand();
string FindEntryWithComment(SALOMEDS::Study_ptr theStudyDocument, const char* theStartEntry,
const char* theComment, int IsAllLevels)
{
- if(MYDEBUG) MESSAGE("FindEntryWithComment - '"<<theComment<<"'");
+ if(0 && MYDEBUG) MESSAGE("FindEntryWithComment - '"<<theComment<<"'");
SALOMEDS::ChildIterator_var anIter =
theStudyDocument->NewChildIterator(theStudyDocument->FindObjectID(theStartEntry));
anIter->InitEx(IsAllLevels);
const char* thePersistentRef, const char* theComment,
CORBA::Boolean theCreateNew)
{
- if(MYDEBUG)
+ if(0 && MYDEBUG)
MESSAGE("CreateAttributes - theName = "<<theName<<"; theComment = '"<<theComment<<
"'; theFatherEntry = "<<theFatherEntry);
SALOMEDS::StudyBuilder_var aStudyBuilder = theStudyDocument->NewBuilder();
}
CORBA::String_var anEntry = newObj->GetID();
string aRet(anEntry);
- if(MYDEBUG) MESSAGE("CreateAttributes - anEntry = "<<aRet<<"; IOR = "<<theIOR);
+ if(0 && MYDEBUG) MESSAGE("CreateAttributes - anEntry = "<<aRet<<"; IOR = "<<theIOR);
return aRet;
}
//===========================================================================
- static CORBA::ORB_var VisuORB;
- static PortableServer::POA_var VisuPOA;
static SALOMEDS::SComponent_var VisuSComponent;
static string VisuTmpDir;
- static VISU_Gen_i* VisuGen;
static CORBA::Boolean myIsMultiFile;
const CORBA::Boolean IsMultifile() {
return myIsMultiFile;
CORBA::Object_ptr anObject = aNamingService.Resolve("/Kernel/Session");
SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
//aSession->GetInterface();
- Engines::Component_var aComponent = aSession->GetVisuGen();
+ Engines::Component_var aComponent = aSession->GetVisuComponent();
myVisuGen = VISU::VISU_Gen::_narrow(aComponent);
}
VISU_Gen_i::~VISU_Gen_i(){
if(MYDEBUG) MESSAGE("VISU_Gen_i::~VISU_Gen_i");
}
- const CORBA::Boolean IsMultifile() { return myIsMultiFile;}
//===========================================================================
bool VISU_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
const SALOMEDS::TMPFile & theStream,
CORBA::Boolean isMultiFile,
CORBA::Boolean isASCII) {
if(myMutex){
- Mutex mt(myMutex,qApp);
CORBA::String_var aString("");
if(strcmp(aLocalPersistentID,"") != 0) {
+ Mutex mt(myMutex,qApp);
Storable* aStorable =
Storable::Create(theSObject,VisuTmpDir.c_str(),aLocalPersistentID);
if(aStorable != NULL) aString = aStorable->GetID();
if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - myMutex = "<<myMutex);
if(myMutex){
Mutex mt(myMutex,qApp);
- TCollection_AsciiString aTmpDir =
- (isMultiFile)?TCollection_AsciiString((char*)theURL):SALOMEDS_Tool::GetTmpDir();
+ CORBA::String_var aString = SALOMEDS_Tool::GetTmpDir();
+ TCollection_AsciiString aTmpDir = isMultiFile? (const Standard_CString)theURL: (const Standard_CString)aString.in();
if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<<aTmpDir);
int aCounter = 0;
TColStd_SequenceOfAsciiString aFileNames;
CORBA::Object_var anObj = SObjectToObject(gotBranch);
if(CORBA::is_nil(anObj)) continue;
Result_i* pResult = dynamic_cast<Result_i*>(GetServant(anObj));
- if(pResult){
+ if(pResult && abs(pResult->GetSourceId()) == Result_i::eFile){
const QFileInfo& aFileInfo = pResult->GetFileInfo();
QString aPrefix = SALOMEDS_Tool::GetNameFromPath(aStudy->URL());
- QString aFileName = aPrefix + "_" + pResult->GetName();
+ QString aFileName = aPrefix + "_" + (pResult->GetName()).c_str();
static QString aCommand;
aCommand.sprintf("cp %s %s%s",aFileInfo.filePath().latin1(),aTmpDir.ToCString(),aFileName.latin1());
if(system(aCommand) == -1){
CORBA::Boolean isASCII) {
if(MYDEBUG) MESSAGE("VISU_Gen_i::IORToLocalPersistentID - myMutex = "<<myMutex);
if(myMutex){
- Mutex mt(myMutex,qApp);
- CORBA::ORB_var anORB = GetORB();
CORBA::String_var aString(IORString);
if(strcmp(IORString,"") != 0){
+ CORBA::ORB_ptr anORB = GetORB();
CORBA::Object_var anObj = anORB->string_to_object(aString);
if(!CORBA::is_nil(anObj)){
Storable* pStorable = dynamic_cast<Storable*>(GetServant(anObj));
if(pStorable != NULL){
- aString = pStorable->ToString();
+ Mutex mt(myMutex,qApp);
+ aString = pStorable->ToString().c_str();
return aString._retn();
}
}
return myVisuGen->IORToLocalPersistentID(theSObject, IORString, isMultiFile, isASCII);
}
- //===========================================================================
- VISU_Gen_i::VISU_Gen_i(CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
- {
- if(MYDEBUG) MESSAGE("VISU_Gen_i::VISU_Gen_i : "<<myMutex);
- _thisObj = this ;
- _id = _poa->activate_object(_thisObj);
- SALOME_NamingService aNamingService(orb);
- CORBA::Object_ptr anObject = aNamingService.Resolve("/Kernel/Session");
- SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
- //aSession->GetInterface();
- //myVisuGen = aSession->GetVisuGen();
- myVisuGen = VISU::VISU_Gen::_narrow( aSession->GetVisuComponent() );
- }
- VISU_Gen_i::VISU_Gen_i(CORBA::ORB_ptr theORB, PortableServer::POA_ptr thePOA, QMutex* theMutex) :
- Engines_Component_i()
- {
- if(MYDEBUG) MESSAGE("VISU_Gen_i::VISU_Gen_i : "<<theMutex);
- Base_i::myMutex = theMutex;
- Base_i::myOrb = CORBA::ORB::_duplicate(theORB);
- Base_i::myPOA = PortableServer::POA::_duplicate(thePOA);
- Mutex mt(myMutex,qApp);
- VisuORB = theORB;
- VisuPOA = thePOA;
- VisuGen = this;
- VisuPOA->activate_object(this);
- RegistryStorable();
- if(!QAD_Application::getDesktop()->getActiveStudy())
- QAD_Application::getDesktop()->createStudy();
- myStudyDocument =
- QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
- }
- VISU_Gen_i::~VISU_Gen_i(){
- if(MYDEBUG) MESSAGE("VISU_Gen_i::~VISU_Gen_i");
- }
void VISU_Gen_i::SetCurrentStudy(SALOMEDS::Study_ptr theStudy){
//if(MYDEBUG) MESSAGE("VISU_Gen_i::SetCurrentStudy : "<<(!theStudy->_is_nil()));
if(myMutex)
}
return myVisuGen->ImportFile(theFileName);
}
- Result_ptr VISU_Gen_i::ImportMed(SALOME_MED::FIELD_ptr theField){
+
+ Result_ptr VISU_Gen_i::ImportMed(SALOMEDS::SObject_ptr theMedSObject){
if(MYDEBUG) MESSAGE("VISU_Gen_i::ImportMed : "<<myMutex);
if(myMutex){
if(myStudyDocument->GetProperties()->IsLocked()) return Result::_nil();
Mutex mt(myMutex,qApp);
Result_i* pResult = new Result_i(myStudyDocument);
- if(pResult->Create(theField) != NULL)
- return Result::_duplicate(pResult->_this());
- return Result::_nil();
- }
- return myVisuGen->ImportMed(theField);
- }
- Result_ptr VISU_Gen_i::ImportMedMesh(SALOME_MED::MESH_ptr theMesh){
- if(MYDEBUG) MESSAGE("VISU_Gen_i::ImportMedMesh : "<<myMutex);
- if(myMutex){
- if(myStudyDocument->GetProperties()->IsLocked()) return Result::_nil();
- Mutex mt(myMutex,qApp);
- Result_i* pResult = new Result_i(myStudyDocument);
- if(pResult->Create(theMesh) != NULL)
- return Result::_duplicate(pResult->_this());
- return Result::_nil();
- }
- return myVisuGen->ImportMedMesh(theMesh);
- }
-
- Result_ptr VISU_Gen_i::ImportMedSupport(SALOME_MED::SUPPORT_ptr theSupport){
- if(MYDEBUG) MESSAGE("VISU_Gen_i::ImportMedSupport : "<<myMutex);
- if(myMutex){
- if(myStudyDocument->GetProperties()->IsLocked()) return Result::_nil();
- Mutex mt(myMutex,qApp);
- Result_i* pResult = new Result_i(myStudyDocument);
- if(pResult->Create(theSupport) != NULL)
+ if(pResult->Create(theMedSObject) != NULL)
return Result::_duplicate(pResult->_this());
return Result::_nil();
}
- return myVisuGen->ImportMedSupport(theSupport);
+ return myVisuGen->ImportMed(theMedSObject);
}
Result_ptr VISU_Gen_i::ImportMedField(SALOME_MED::FIELD_ptr theField){
if(myMutex){
if(myStudyDocument->GetProperties()->IsLocked()) return Curve::_nil();
Mutex mt(myMutex,qApp);
- PortableServer::POA_var aPOA = GetPOA();
+ PortableServer::POA_ptr aPOA = GetPOA();
Table_i* pTable = dynamic_cast<Table_i*>(aPOA->reference_to_servant(theTable));
Curve_i* aPresent = new Curve_i(myStudyDocument,pTable,theHRow,theVRow);
if(aPresent->Create() != NULL) {
if(myMutex){
Mutex mt(myMutex,qApp);
SALOMEDS::SObject_var aResultSO;
- PortableServer::POA_var aPOA = GetPOA();
- Result_i* aResultObj = dynamic_cast<Result_i*>(aPOA->reference_to_servant(theObject));
+ Result_i* aResultObj = dynamic_cast<Result_i*>(GetServant(theObject));
if (!aResultObj) return aResultSO._retn();
-
- CORBA::String_var anEntry;
const QFileInfo& aFileInfo = aResultObj->GetFileInfo();
- anEntry = strdup(aResultObj->Create(aFileInfo.filePath().latin1())->GetID());
-// if (CORBA::is_nil(theSObject)) {
-// anEntry = strdup(aResultObj->Create(SALOMEDS::SObject::_nil(), theName));
-// } else {
-// if (!theSObject->ReferencedObject(aResultSO))
-// THROW_SALOME_CORBA_EXCEPTION("Publish error: bad referenced SObject",SALOME::BAD_PARAM);
-// anEntry = strdup(aResultObj->Create(aResultSO, (const char *)theName));
-// }
+ CORBA::String_var anEntry = aResultObj->Create(aFileInfo.filePath().latin1())->GetID();
aResultSO = theStudy->FindObjectID(anEntry);
return aResultSO._retn();
}
}
CORBA::Boolean VISU_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) {
- if(MYDEBUG) MESSAGE("VISU_Gen_i::CanCopy : "<<myMutex);
+ if(0 && MYDEBUG) MESSAGE("VISU_Gen_i::CanCopy : "<<myMutex);
if(myMutex){
//Mutex mt(myMutex,qApp);
SALOMEDS::GenericAttribute_var anAttr;
if (!theObject->FindAttribute(anAttr, "AttributeIOR")) return false;
try {
- CORBA::Object_var anObj = GetORB()->string_to_object(SALOMEDS::AttributeIOR::_narrow(anAttr)->Value());
- if (CORBA::is_nil(anObj)) return false;
- else {
- Result_var aResultObj = Result::_narrow(anObj);
- if (aResultObj->_is_nil()) return false;
+ SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
+ CORBA::String_var aValue = anIOR->Value();
+ if(strcmp(aValue,"") != 0){
+ CORBA::Object_ptr anObj = GetORB()->string_to_object(aValue);
+ if (!CORBA::is_nil(anObj)){
+ Result_var aResultObj = Result::_narrow(anObj);
+ if(!aResultObj->_is_nil()){
+ Result_i* pResult = dynamic_cast<Result_i*>(GetServant(aResultObj));
+ if(pResult != NULL){
+ if(abs(pResult->GetSourceId()) > Result_i::eFile)
+ if((pResult->GetFileInfo()).filePath() == "Med") return false;
+ return true;
+ }
+ }
+ }
}
} catch (...) {
- return false;
+ MESSAGE("Unknown exception was accured!");
}
- return true;
+ return false;
}
return myVisuGen->CanCopy(theObject);
}
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile;
SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames;
- PortableServer::POA_var aPOA = GetPOA();
+ PortableServer::POA_ptr aPOA = GetPOA();
SALOMEDS::GenericAttribute_var anAttr;
if (!theObject->FindAttribute(anAttr,"AttributeIOR")) return NULL;
}
CORBA::String_var aTmpDir = SALOMEDS_Tool::GetTmpDir();
- char* aStr = strdup(pStorable->ToString());
+ string aStr = pStorable->ToString().c_str();
ofstream stmOut2((string(aTmpDir) + string("copy_persistent")).c_str(),ios::out);
stmOut2<<aStr<<endl;
stmOut2.close();
Result_i* aResultObj = dynamic_cast<Result_i*>(aPOA->reference_to_servant(aCorbaObj));
if (aResultObj) {
- string aStudyPrefix = string(SALOMEDS_Tool::GetNameFromPath(theObject->GetStudy()->URL())) + string("_");
-
+ string aFileName = string(SALOMEDS_Tool::GetNameFromPath(theObject->GetStudy()->URL())) + "_";
const QFileInfo& aFileInfo = aResultObj->GetFileInfo();
+ aFileName += aFileInfo.fileName().latin1();
static QString aCommand;
aCommand.sprintf("cp %s %s",
aFileInfo.filePath().latin1(),
- (string(aTmpDir)+aStudyPrefix + string(aResultObj->GetName())).c_str());
+ (string(aTmpDir) + aFileName).c_str());
if(system(aCommand) == -1) {
if(MYDEBUG) MESSAGE("VISU_Gen_i::Copy - Cann't execute the command :"<<aCommand);
return NULL;
aSeq->length(2);
aSeq[0] = "copy_persistent";
- aSeq[1] = (aStudyPrefix + string(aResultObj->GetName())).c_str();
+ aSeq[1] = aFileName.c_str();
} else {
aSeq->length(1);
aSeq[0] = "copy_persistent";
CORBA::Boolean VISU_Gen_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID) {
// The VISU component can paste only objects copied by VISU component
// and with the object type = 1
- if(MYDEBUG) MESSAGE("VISU_Gen_i::CanPaste : "<<myMutex);
+ if(0 && MYDEBUG) MESSAGE("VISU_Gen_i::CanPaste : "<<myMutex);
if (strcmp(theComponentName, ComponentDataType()) != 0 || theObjectID != 1) return false;
return true;
}
SALOMEDS::SObject_var aResultSO;
if (theObjectID != 1) return aResultSO._retn();
- CORBA::String_var aTmpDir = strdup(SALOMEDS_Tool::GetTmpDir());
+ CORBA::String_var aTmpDir = (const char*)SALOMEDS_Tool::GetTmpDir();
SALOMEDS::ListOfFileNames_var aSeq = SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir, false);
- SALOMEDS::SComponent_var aComponent = theObject->GetFatherComponent();
- SALOMEDS::Study_var aStudy = theObject->GetStudy();
- SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
- CORBA::ORB_var anORB = GetORB();
-
ifstream stmIn((string(aTmpDir) + string("copy_persistent")).c_str());
// ifstream stmIn((string(aTmpDir) + string("copy_persistent")).c_str(),ios::in);
stmIn.seekg(0, ios::end);
stmIn.read(aString, aLength);
aString[aLength] = 0;
myIsMultiFile = true;
- Storable* aStorable = Storable::Create(theObject,aTmpDir.in(),aString);
+
+ string aFileName(aTmpDir.in());
+ if(aSeq->length() > 1) aFileName += aSeq[1].in();
+ Storable* aStorable = Storable::Create(theObject,aFileName,aString);
SALOMEDS::ListOfFileNames_var aSeqToRm = new SALOMEDS::ListOfFileNames;
aSeqToRm->length(1);
aSeqToRm[0] = "copy_persistent";
SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir, aSeqToRm.in(), true);
- CORBA::String_var aComponentIDString(aComponent->GetID());
- if (strcmp(aComponentIDString, theObject->GetID()) == 0) {
- // create the new result SObject
+ SALOMEDS::SComponent_var aComponent = theObject->GetFatherComponent();
+ SALOMEDS::Study_var aStudy = theObject->GetStudy();
+ SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+ CORBA::String_var aComponentID(aComponent->GetID()), aSObjID(theObject->GetID());
+ if (strcmp(aComponentID, aSObjID) == 0) //create the new result SObject
aResultSO = aStudyBuilder->NewObject(aComponent);
- } else {
+ else
aResultSO = SALOMEDS::SObject::_duplicate(theObject);
- }
- SALOMEDS::AttributeIOR_var anIOR =
- SALOMEDS::AttributeIOR::_narrow(aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR"));
- anIOR->SetValue(aStorable->GetID());
+ SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR");
+ SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
+ CORBA::String_var anIORValue(aStorable->GetID());
+ anIOR->SetValue(anIORValue);
return aResultSO._retn();
}
return myVisuGen->PasteInto(theStream,theObjectID,theObject);