Version: 6.3.1
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes

VISU.ColoredPrs3dCache_i Class Reference

#include <VISU_ColoredPrs3dCache_i.hh>

Inheritance diagram for VISU.ColoredPrs3dCache_i:
Inheritance graph

Public Types

typedef Storable TSuperClass
typedef std::map< std::string,
QString > 
TRestoringMap
typedef Storable *(* TStorableEngine )(SALOMEDS::SObject_ptr theSObject, const TRestoringMap &theMap, const std::string &thePrefix, CORBA::Boolean theIsMultiFile)
typedef std::map< std::string,
TStorableEngine
TStorableEngineMap
typedef std::string TFileName
typedef std::vector< TFileNameTFileNames
typedef VISU::Base TInterface

Public Member Functions

 ColoredPrs3dCache_i (SALOMEDS::Study_ptr theStudy, bool thePublishInStudy=true)
 A constructor to create an instance of the class.
virtual ~ColoredPrs3dCache_i ()
virtual
VISU::ColoredPrs3dHolder_ptr 
CreateHolder (VISU::VISUType theType, const VISU::ColoredPrs3dHolder::BasicInput &theInput)
virtual
VISU::ColoredPrs3dCache::EnlargeType 
GetRequiredMemory (VISU::VISUType theType, const VISU::ColoredPrs3dHolder::BasicInput &theInput, CORBA::Float &theRequiredMemory)
virtual void SetMemoryMode (VISU::ColoredPrs3dCache::MemoryMode theMode)
 Sets a memory mode.
virtual
VISU::ColoredPrs3dCache::MemoryMode 
GetMemoryMode ()
virtual void SetLimitedMemory (CORBA::Float theMemorySize)
 Sets a memory size for limited mode.
virtual CORBA::Float GetLimitedMemory ()
virtual CORBA::Float GetMemorySize ()
virtual CORBA::Float GetDeviceMemorySize ()
virtual VISU::VISUType GetType ()
virtual void RemoveFromStudy ()
virtual const char * GetComment () const
virtual void ToStream (std::ostringstream &)
virtual StorableRestore (SALOMEDS::SObject_ptr theSObject, const Storable::TRestoringMap &theMap)
VISU::ColoredPrs3d_iCreateColoredPrs3d (VISU::VISUType theType, VISU::ColoredPrs3dHolder::BasicInput theInput)
 Creates corresponding ColoredPrs3d instance and apply the BasicInput.
VISU::ColoredPrs3d_iRegisterInHolder (VISU::ColoredPrs3d_i *thePrs3d, const std::string &theHolderEntry)
 Registers the given ColoredPrs3d instance for the ColoredPrs3dHolder.
VISU::ColoredPrs3d_iCreatePrs (VISU::VISUType theType, VISU::ColoredPrs3dHolder::BasicInput theInput, VISU::ColoredPrs3dHolder_i *theHolder)
 Creates and registers corresponding ColoredPrs3d instance for the ColoredPrs3dHolder.
TLastVisitedPrsListGetLastVisitedPrsList (VISU::ColoredPrs3dHolder_i *theHolder)
TPrs3dPtr GetLastVisitedPrs (VISU::ColoredPrs3dHolder_i *theHolder)
bool UpdateLastVisitedPrs (VISU::ColoredPrs3dHolder_i *theHolder, VISU::ColoredPrs3d_i *thePrs, const VISU::ColoredPrs3dHolder::BasicInput &theInput, VISU::View3D_ptr theView3D)
void RemoveHolder (VISU::ColoredPrs3dHolder_i *theHolder)
 Unregister the holder instance from cache.
SALOMEDS::Study_var GetStudyDocument () const
SalomeApp_Study * GetGUIStudy () const
virtual std::string GetEntry ()
virtual std::string GetName () const
virtual void SetName (const std::string &theName, bool theIsUpdateStudyAttr)
std::string ToString ()
virtual CORBA::Boolean CanCopy (SALOMEDS::SObject_ptr theObject)
virtual bool CopyFrom (SALOMEDS::SObject_ptr theObject, CORBA::Long &theObjectID, const std::string &theTmpDir, TFileNames &theFileNames)
virtual char * GetID ()

Static Public Member Functions

static std::string GetFolderName ()
static StorableStorableEngine (SALOMEDS::SObject_ptr theSObject, const Storable::TRestoringMap &theMap, const std::string &thePrefix, CORBA::Boolean theIsMultiFile)
static VISU::ColoredPrs3dCache_iGetInstance_i (SALOMEDS::Study_ptr theStudy)
 Finds or creates instance of the ColoredPrs3dCache in the given SALOMEDS.Study.
static VISU::ColoredPrs3dCache_ptr GetInstance (SALOMEDS::Study_ptr theStudy)
static void RegistryStorableEngine (const std::string &theComment, TStorableEngine theEngine)
static StorableCreate (SALOMEDS::SObject_ptr theSObject, const std::string &theLocalPersistentID, const std::string &thePrefix, CORBA::Boolean theIsMultiFile)
static VISU::VISUType Comment2Type (const std::string &theComment)
static VISU::VISUType RestoringMap2Type (const TRestoringMap &theRestoringMap)
static VISU::VISUType Stream2Type (const std::string &thePersistentString)
static VISU::VISUType SObject2Type (const _PTR(SObject)&theSObject)
static std::string CorrectPersistentString (const std::string &thePersistentString)
static std::string FindEntry (SALOMEDS::Study_ptr theStudyDocument, const std::string &theStartEntry, const TRestoringMap &theRestoringMap, int IsAllLevels=true)
static QString FindValue (const TRestoringMap &theMap, const std::string &theArg, bool *theIsFind=NULL)
static QString FindValue (const TRestoringMap &theMap, const std::string &theArg, const QString &theDefaultValue)
static void StringToMap (const QString &theString, TRestoringMap &theMap)
static TRestoringMap GetStorableMap (_PTR(SObject) theSObject)
static SALOMEDS::SObject_ptr GetResultSO (SALOMEDS::SObject_ptr theSObject)
static void DataToStream (std::ostringstream &theStr, const QString &theName, const QString &theVal)
static void DataToStream (std::ostringstream &theStr, const QString &theName, int theVal)
static void DataToStream (std::ostringstream &theStr, const QString &theName, long theVal)
static void DataToStream (std::ostringstream &theStr, const QString &theName, double theVal)
static CORBA::ORB_var GetORB ()
static PortableServer::POA_var GetPOA ()
static SALOME_NamingService * GetNS ()
static SALOME_LifeCycleCORBA * GetLCC ()
static VISU_Gen_iGetVisuGenImpl ()

Static Public Attributes

static const std::string myComment = "COLOREDPRS3DCACHE"

Protected Member Functions

virtual int IsPossible (VISU::VISUType theType, const VISU::ColoredPrs3dHolder::BasicInput &theInput, float &theMemoryToClear, const std::string theHolderEntry)
TPrs3dPtr FindPrsByInput (TLastVisitedPrsList &theLastVisitedPrsList, const VISU::ColoredPrs3dHolder::BasicInput &theInput)
void ClearCache (float theMemory=0)
bool ClearMemory (CORBA::Float theRequiredMemory, const std::string &theHolderEntry)
void PrintCache ()
void SetStudyDocument (SALOMEDS::Study_ptr theStudy)

Protected Attributes

std::string myID

Static Protected Attributes

static QMutex * myMutex = NULL
static CORBA::ORB_var myOrb
static PortableServer::POA_var myPoa
static SALOME_NamingService * myNamingService
static VISU_Gen_imyVisuGenImpl
static SALOME_LifeCycleCORBA * myEnginesLifeCycle

Private Member Functions

 ColoredPrs3dCache_i ()
 ColoredPrs3dCache_i (const ColoredPrs3dCache_i &)

Private Attributes

CORBA::Float myLimitedMemory
VISU::ColoredPrs3dCache::MemoryMode myMemoryMode
TColoredPrs3dHolderMap myHolderMap

Detailed Description

This interface is responsible for memory management of 3d presentations. One cache corresponds to one study.


Member Typedef Documentation

typedef std::map<std::string, QString> VISU.Storable.TRestoringMap [inherited]
typedef Storable*(* VISU.Storable.TStorableEngine)(SALOMEDS::SObject_ptr theSObject, const TRestoringMap &theMap, const std::string &thePrefix, CORBA::Boolean theIsMultiFile) [inherited]
typedef std::string VISU.Storable.TFileName [inherited]

Reimplemented in VISU.Result_i.

typedef std::vector<TFileName> VISU.Storable.TFileNames [inherited]

Reimplemented in VISU.Result_i.

typedef VISU::Base VISU.Base_i.TInterface [inherited]

Constructor & Destructor Documentation

VISU.ColoredPrs3dCache_i.ColoredPrs3dCache_i ( ) [private]
VISU.ColoredPrs3dCache_i.ColoredPrs3dCache_i ( const ColoredPrs3dCache_i ) [private]
VISU.ColoredPrs3dCache_i::ColoredPrs3dCache_i ( SALOMEDS::Study_ptr  theStudy,
bool  thePublishInStudy = true 
) [explicit]
VISU.ColoredPrs3dCache_i::~ColoredPrs3dCache_i ( ) [virtual]

References MESSAGE, and MYDEBUG.


Member Function Documentation

VISU::ColoredPrs3dHolder_ptr VISU.ColoredPrs3dCache_i::CreateHolder ( VISU::VISUType  theType,
const VISU::ColoredPrs3dHolder::BasicInput theInput 
) [virtual]
VISU::ColoredPrs3dCache::EnlargeType VISU.ColoredPrs3dCache_i::GetRequiredMemory ( VISU::VISUType  theType,
const VISU::ColoredPrs3dHolder::BasicInput theInput,
CORBA::Float &  theRequiredMemory 
) [virtual]
void VISU.ColoredPrs3dCache_i::SetMemoryMode ( VISU::ColoredPrs3dCache::MemoryMode  theMode) [virtual]
VISU::ColoredPrs3dCache::MemoryMode VISU.ColoredPrs3dCache_i::GetMemoryMode ( ) [virtual]
void VISU.ColoredPrs3dCache_i::SetLimitedMemory ( CORBA::Float  theMemorySize) [virtual]
CORBA::Float VISU.ColoredPrs3dCache_i::GetLimitedMemory ( ) [virtual]
CORBA::Float VISU.ColoredPrs3dCache_i::GetMemorySize ( ) [virtual]
CORBA::Float VISU.ColoredPrs3dCache_i::GetDeviceMemorySize ( ) [virtual]
virtual VISU::VISUType VISU.ColoredPrs3dCache_i.GetType ( ) [virtual]

Implements VISU.Base_i.

References VISU.TCOLOREDPRS3DCACHE.

void VISU.ColoredPrs3dCache_i::RemoveFromStudy ( ) [virtual]
std::string VISU.ColoredPrs3dCache_i::GetFolderName ( ) [static]
const char * VISU.ColoredPrs3dCache_i::GetComment ( ) const [virtual]

Implements VISU.Storable.

void VISU.ColoredPrs3dCache_i::ToStream ( std::ostringstream &  theStr) [virtual]
VISU::Storable * VISU.ColoredPrs3dCache_i::Restore ( SALOMEDS::SObject_ptr  theSObject,
const Storable::TRestoringMap theMap 
) [virtual]
VISU::Storable * VISU.ColoredPrs3dCache_i::StorableEngine ( SALOMEDS::SObject_ptr  theSObject,
const Storable::TRestoringMap theMap,
const std::string thePrefix,
CORBA::Boolean  theIsMultiFile 
) [static]
VISU::ColoredPrs3dCache_i * VISU.ColoredPrs3dCache_i::GetInstance_i ( SALOMEDS::Study_ptr  theStudy) [static]
VISU::ColoredPrs3dCache_ptr VISU.ColoredPrs3dCache_i::GetInstance ( SALOMEDS::Study_ptr  theStudy) [static]
VISU::ColoredPrs3d_i * VISU.ColoredPrs3dCache_i::CreateColoredPrs3d ( VISU::VISUType  theType,
VISU::ColoredPrs3dHolder::BasicInput  theInput 
)
VISU::ColoredPrs3d_i * VISU.ColoredPrs3dCache_i::RegisterInHolder ( VISU::ColoredPrs3d_i thePrs3d,
const std::string theHolderEntry 
)
VISU::ColoredPrs3d_i * VISU.ColoredPrs3dCache_i::CreatePrs ( VISU::VISUType  theType,
VISU::ColoredPrs3dHolder::BasicInput  theInput,
VISU::ColoredPrs3dHolder_i theHolder 
)
VISU::TLastVisitedPrsList & VISU.ColoredPrs3dCache_i::GetLastVisitedPrsList ( VISU::ColoredPrs3dHolder_i theHolder)
VISU::TPrs3dPtr VISU.ColoredPrs3dCache_i::GetLastVisitedPrs ( VISU::ColoredPrs3dHolder_i theHolder)
bool VISU.ColoredPrs3dCache_i::UpdateLastVisitedPrs ( VISU::ColoredPrs3dHolder_i theHolder,
VISU::ColoredPrs3d_i thePrs,
const VISU::ColoredPrs3dHolder::BasicInput theInput,
VISU::View3D_ptr  theView3D 
)
void VISU.ColoredPrs3dCache_i::RemoveHolder ( VISU::ColoredPrs3dHolder_i theHolder)
virtual int VISU.ColoredPrs3dCache_i.IsPossible ( VISU::VISUType  theType,
const VISU::ColoredPrs3dHolder::BasicInput theInput,
float &  theMemoryToClear,
const std::string  theHolderEntry 
) [protected, virtual]
VISU::TPrs3dPtr VISU.ColoredPrs3dCache_i::FindPrsByInput ( TLastVisitedPrsList theLastVisitedPrsList,
const VISU::ColoredPrs3dHolder::BasicInput theInput 
) [protected]

References visu_cache.anInput.

void VISU.ColoredPrs3dCache_i::ClearCache ( float  theMemory = 0) [protected]
bool VISU.ColoredPrs3dCache_i::ClearMemory ( CORBA::Float  theRequiredMemory,
const std::string theHolderEntry 
) [protected]

References VISU.ErasePrs3d().

void VISU.ColoredPrs3dCache_i::PrintCache ( ) [protected]

References MYDEBUG.

SALOMEDS::Study_var VISU.RemovableObject_i::GetStudyDocument ( ) const [inherited]

Reimplemented in VISU.Result_i.

SalomeApp_Study * VISU.RemovableObject_i::GetGUIStudy ( ) const [inherited]
std::string VISU.RemovableObject_i::GetEntry ( ) [virtual, inherited]

Reimplemented in VISU.Result_i.

std::string VISU.RemovableObject_i::GetName ( ) const [virtual, inherited]
void VISU.RemovableObject_i::SetName ( const std::string theName,
bool  theIsUpdateStudyAttr 
) [virtual, inherited]
void VISU.RemovableObject_i::SetStudyDocument ( SALOMEDS::Study_ptr  theStudy) [protected, inherited]

References VISU.GetGUIStudy().

std::string VISU.Storable::ToString ( ) [inherited]
void VISU.Storable::RegistryStorableEngine ( const std::string theComment,
TStorableEngine  theEngine 
) [static, inherited]
Storable * VISU.Storable::Create ( SALOMEDS::SObject_ptr  theSObject,
const std::string theLocalPersistentID,
const std::string thePrefix,
CORBA::Boolean  theIsMultiFile 
) [static, inherited]
VISU::VISUType VISU.Storable::Comment2Type ( const std::string theComment) [static, inherited]
VISU::VISUType VISU.Storable::RestoringMap2Type ( const TRestoringMap theRestoringMap) [static, inherited]
VISU::VISUType VISU.Storable::Stream2Type ( const std::string thePersistentString) [static, inherited]
VISU::VISUType VISU.Storable::SObject2Type ( const _PTR(SObject)&  theSObject) [static, inherited]

References VISU._PTR(), and VISU.TNONE.

std::string VISU.Storable::CorrectPersistentString ( const std::string thePersistentString) [static, inherited]
std::string VISU.Storable::FindEntry ( SALOMEDS::Study_ptr  theStudyDocument,
const std::string theStartEntry,
const TRestoringMap theRestoringMap,
int  IsAllLevels = true 
) [static, inherited]
QString VISU.Storable::FindValue ( const TRestoringMap theMap,
const std::string theArg,
bool *  theIsFind = NULL 
) [static, inherited]

References MESSAGE, and MYDEBUG.

QString VISU.Storable::FindValue ( const TRestoringMap theMap,
const std::string theArg,
const QString &  theDefaultValue 
) [static, inherited]
void VISU.Storable::StringToMap ( const QString &  theString,
TRestoringMap theMap 
) [static, inherited]
Storable::TRestoringMap VISU.Storable::GetStorableMap ( _PTR(SObject)  theSObject) [static, inherited]
static SALOMEDS::SObject_ptr VISU.Storable.GetResultSO ( SALOMEDS::SObject_ptr  theSObject) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
const QString &  theVal 
) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
int  theVal 
) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
long  theVal 
) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
double  theVal 
) [static, inherited]
CORBA::Boolean VISU.Storable::CanCopy ( SALOMEDS::SObject_ptr  theObject) [virtual, inherited]

Reimplemented in VISU.Result_i.

bool VISU.Storable::CopyFrom ( SALOMEDS::SObject_ptr  theObject,
CORBA::Long &  theObjectID,
const std::string theTmpDir,
TFileNames theFileNames 
) [virtual, inherited]

Reimplemented in VISU.Result_i.

References VISU_Example_06.aFileName.

char * VISU.Base_i::GetID ( ) [virtual, inherited]

Reimplemented in VISU.VISU_Gen_i, and VISU.VISU_Gen_i.

static CORBA::ORB_var VISU.Base_i.GetORB ( ) [static, inherited]
static PortableServer::POA_var VISU.Base_i.GetPOA ( ) [static, inherited]
static SALOME_NamingService* VISU.Base_i.GetNS ( ) [static, inherited]

References visu.myNamingService.

static SALOME_LifeCycleCORBA* VISU.Base_i.GetLCC ( ) [static, inherited]
static VISU_Gen_i* VISU.Base_i.GetVisuGenImpl ( ) [static, inherited]

Field Documentation

const string VISU.ColoredPrs3dCache_i::myComment = "COLOREDPRS3DCACHE" [static]
std::string VISU.Base_i.myID [protected, inherited]
QMutex * VISU.Base_i::myMutex = NULL [static, protected, inherited]
CORBA::ORB_var VISU.Base_i::myOrb [static, protected, inherited]
PortableServer::POA_var VISU.Base_i::myPoa [static, protected, inherited]
SALOME_NamingService * VISU.Base_i::myNamingService [static, protected, inherited]
VISU_Gen_i * VISU.Base_i::myVisuGenImpl [static, protected, inherited]
SALOME_LifeCycleCORBA * VISU.Base_i::myEnginesLifeCycle [static, protected, inherited]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS