#include <SoHistogramCnv.h>
Inheritance diagram for SoHistogramCnv:
Public Types | |
INVALID_ADDRESS | |
INVALID_OBJECT | |
NO_MEMORY | |
BAD_STORAGE_TYPE | |
NO_SOURCE_OBJECT | |
ICONVERSIONSVC_LAST_ERROR | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
Public Member Functions | |
SoHistogramCnv (ISvcLocator *) | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | initialize () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | finalize () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual long | repSvcType () const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | createRep (DataObject *, IOpaqueAddress *&) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
virtual unsigned long | addRef () |
virtual unsigned long | release () |
virtual StatusCode | setDataProvider (IDataProviderSvc *svc) |
virtual IDataProviderSvc * | dataProvider () const |
virtual StatusCode | setConversionSvc (IConversionSvc *svc) |
virtual IConversionSvc * | conversionSvc () const |
virtual StatusCode | setAddressCreator (IAddressCreator *creator) |
virtual IAddressCreator * | addressCreator () const |
virtual const CLID & | objType () const |
virtual long | i_repSvcType () const |
virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) |
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject) |
virtual StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=false) const |
StatusCode | service (const std::string &type, const std::string &name, T *&psvc) const |
Static Public Member Functions | |
static const CLID & | classID () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
static const unsigned char | storageType () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
static const InterfaceID & | interfaceID () |
Public Attributes | |
INVALID_ADDRESS | |
INVALID_OBJECT | |
NO_MEMORY | |
BAD_STORAGE_TYPE | |
NO_SOURCE_OBJECT | |
ICONVERSIONSVC_LAST_ERROR | |
Protected Member Functions | |
ISvcLocator * | serviceLocator () const |
IMessageSvc * | msgSvc () const |
IMessageSvc * | messageService () const |
IDataManagerSvc * | dataManager () const |
Protected Attributes | |
IUserInterfaceSvc * | fUISvc |
Friends | |
class | CnvFactory< SoHistogramCnv > |
Definition at line 18 of file SoHistogramCnv.h.
SoHistogramCnv::SoHistogramCnv | ( | ISvcLocator * | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 39 of file SoHistogramCnv.cpp.
00042 :Converter(So_TechnologyType,CLID_Histogram,aSvcLoc) 00043 ,fUISvc(0) 00044 //#601,fRootSvc(0) 00047 { 00048 }
StatusCode SoHistogramCnv::initialize | ( | ) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Reimplemented from Converter.
Definition at line 50 of file SoHistogramCnv.cpp.
00054 { 00055 StatusCode status = Converter::initialize(); 00056 if( status.isFailure() ) return status; 00057 00058 MsgStream log(messageService(), "SoHistogramCnv"); 00059 00060 {if(fUISvc) { 00061 fUISvc->release(); 00062 fUISvc = 0; 00063 } 00064 StatusCode status = service("OnXSvc",fUISvc,true); 00065 if(status.isFailure() || !fUISvc) { 00066 log << MSG::INFO << " OnXSvc not found " << endreq; 00067 return StatusCode::FAILURE; 00068 } 00069 fUISvc->addRef();} 00070 00071 return StatusCode::SUCCESS; 00072 }
StatusCode SoHistogramCnv::finalize | ( | ) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Reimplemented from Converter.
Definition at line 74 of file SoHistogramCnv.cpp.
00077 { 00078 if(fUISvc) { 00079 fUISvc->release(); 00080 fUISvc = 0; 00081 } 00082 //#601 if(fRootSvc) { 00083 //#601 fRootSvc->release(); 00084 //#601 fRootSvc = 0; 00085 //#601 } 00086 return StatusCode::SUCCESS; 00087 }
long SoHistogramCnv::repSvcType | ( | ) | const [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Implements Converter.
Definition at line 89 of file SoHistogramCnv.cpp.
00092 { 00093 return i_repSvcType(); 00094 }
StatusCode SoHistogramCnv::createRep | ( | DataObject * | , | |
IOpaqueAddress *& | ||||
) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Reimplemented from Converter.
Definition at line 112 of file SoHistogramCnv.cpp.
00118 { 00119 MsgStream log(messageService(), "SoHistogramCnv"); 00120 log << MSG::INFO << "Histogram createReps" << endreq; 00121 00122 if(!aObject) { 00123 log << MSG::INFO << " NULL object." << endreq; 00124 return StatusCode::FAILURE; 00125 } 00126 00127 if(!fUISvc) { 00128 log << MSG::INFO << " OnXSvc not found " << endreq; 00129 return StatusCode::FAILURE; 00130 } 00131 00132 IWidget* widget = fUISvc->currentWidget(); 00133 if(!widget) { 00134 log << MSG::INFO << " can't get current widget." << endreq; 00135 return StatusCode::FAILURE; 00136 } 00137 00138 if(widget->widgetClass().name()=="PageViewer") { 00139 00140 SoRegion* soRegion = fUISvc->currentSoRegion(); 00141 if(!soRegion) { 00142 log << MSG::INFO << " can't get SoRegion." << endreq; 00143 return StatusCode::FAILURE; 00144 } 00145 if(!soRegion->isOfType(SoPlotterRegion::getClassTypeId())) { 00146 log << MSG::INFO << " region is not a SoPlotterRegion." << endreq; 00147 return StatusCode::FAILURE; 00148 } 00149 00150 if(AIDA::IHistogram1D* histogram = 00151 dynamic_cast<AIDA::IHistogram1D*>(aObject)) { 00152 SbPlottableObject* sbPlottable = 00153 new SoHistogramRep1D(aObject->name(),histogram); 00154 soRegion->doIt(SbPlotterDoIt(sbPlottable)); 00155 00156 } else if(AIDA::IHistogram2D* histogram = 00157 dynamic_cast<AIDA::IHistogram2D*>(aObject)) { 00158 SbPlottableObject* sbPlottable = 00159 new SoHistogramRep2D(aObject->name(),histogram); 00160 soRegion->doIt(SbPlotterDoIt(sbPlottable)); 00161 00162 } else { 00163 log << MSG::INFO 00164 << " today only plotting of AIDA::IHistogram1D,2D supported." 00165 << endreq; 00166 return StatusCode::FAILURE; 00167 } 00168 00169 } else if(widget->widgetClass().name()=="TCanvas") { 00170 00171 //#601 if(!fRootSvc) { 00172 //#601 StatusCode status = service("RootSvc",fRootSvc,true); 00173 //#601 if(status.isFailure() || !fRootSvc) { 00174 //#601 log << MSG::INFO << " OnXSvc not found " << endreq; 00175 //#601 return StatusCode::SUCCESS; //Not fatal. 00176 //#601 } 00177 //#601 fRootSvc->addRef(); 00178 //#601 } 00179 00180 if(AIDA::IHistogram* histogram = 00181 dynamic_cast<AIDA::IHistogram*>(aObject)) { 00182 00183 //#601 fRootSvc->visualize(*histogram); 00184 00185 } else { 00186 log << MSG::INFO 00187 << " object not an AIDA::IHistogram." 00188 << endreq; 00189 return StatusCode::FAILURE; 00190 } 00191 00192 } else { 00193 log << MSG::INFO 00194 << " viewer not a PageViewer or a TCanvas." 00195 << endreq; 00196 return StatusCode::FAILURE; 00197 } 00198 00199 return StatusCode::SUCCESS; 00200 }
const CLID & SoHistogramCnv::classID | ( | ) | [static] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 96 of file SoHistogramCnv.cpp.
00100 { 00101 return CLID_Histogram; 00102 }
const unsigned char SoHistogramCnv::storageType | ( | ) | [static] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 104 of file SoHistogramCnv.cpp.
00108 { 00109 return So_TechnologyType; 00110 }
friend class CnvFactory< SoHistogramCnv > [friend] |
Definition at line 19 of file SoHistogramCnv.h.
IUserInterfaceSvc* SoHistogramCnv::fUISvc [protected] |
Definition at line 30 of file SoHistogramCnv.h.