#ifndef ROOT_TEveUtil
#define ROOT_TEveUtil
#include "TObject.h"
#include "TString.h"
#include "TError.h"
#include "GuiTypes.h"
#include <list>
#include <set>
#include <exception>
class TVirtualPad;
class TGeoManager;
class TEveElement;
class TEveUtil
{
public:
virtual ~TEveUtil() {}
static void SetupEnvironment();
static void SetupGUI();
static Bool_t CheckMacro(const Text_t* mac);
static void AssertMacro(const Text_t* mac);
static void Macro(const Text_t* mac);
static void LoadMacro(const Text_t* mac);
static void ColorFromIdx(Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE);
static void ColorFromIdx(Float_t f1, Color_t c1, Float_t f2, Color_t c2,
UChar_t col[4], Bool_t alpha=kTRUE);
static Color_t* FindColorVar(TObject* obj, const Text_t* varname);
ClassDef(TEveUtil, 0);
};
bool operator==(const TString& t, const std::string& s);
bool operator==(const std::string& s, const TString& t);
class TEveException : public std::exception, public TString
{
public:
TEveException() {}
TEveException(const TString& s) : TString(s) {}
TEveException(const char* s) : TString(s) {}
TEveException(const std::string& s);
virtual ~TEveException() throw () {}
virtual const char* what() const throw () { return Data(); }
ClassDef(TEveException, 1);
};
TEveException operator+(const TEveException &s1, const std::string &s2);
TEveException operator+(const TEveException &s1, const TString &s2);
TEveException operator+(const TEveException &s1, const char *s2);
class TEvePadHolder
{
private:
TVirtualPad *fOldPad;
Bool_t fModifyUpdateP;
public:
TEvePadHolder(Bool_t modify_update_p, TVirtualPad* new_pad=0, Int_t subpad=0);
virtual ~TEvePadHolder();
ClassDef(TEvePadHolder, 0);
};
class TEveGeoManagerHolder
{
private:
TGeoManager* fManager;
TEveGeoManagerHolder(const TEveGeoManagerHolder&);
TEveGeoManagerHolder& operator=(const TEveGeoManagerHolder&);
public:
TEveGeoManagerHolder(TGeoManager* new_gmgr=0);
virtual ~TEveGeoManagerHolder();
ClassDef(TEveGeoManagerHolder, 0);
};
class TEveRefCnt
{
protected:
Int_t fRefCount;
public:
TEveRefCnt() : fRefCount(0) {}
virtual ~TEveRefCnt() {}
TEveRefCnt(const TEveRefCnt&) : fRefCount(0) {}
TEveRefCnt& operator=(const TEveRefCnt&) { return *this; }
void IncRefCount() { ++fRefCount; }
void DecRefCount() { if(--fRefCount <= 0) OnZeroRefCount(); }
virtual void OnZeroRefCount() { delete this; }
ClassDef(TEveRefCnt, 0);
};
class TEveRefBackPtr : public TEveRefCnt
{
protected:
std::list<TEveElement*> fBackRefs;
public:
TEveRefBackPtr();
virtual ~TEveRefBackPtr();
TEveRefBackPtr(const TEveRefBackPtr&);
TEveRefBackPtr& operator=(const TEveRefBackPtr&);
using TEveRefCnt::IncRefCount;
using TEveRefCnt::DecRefCount;
virtual void IncRefCount(TEveElement* re);
virtual void DecRefCount(TEveElement* re);
virtual void UpdateBackPtrItems();
ClassDef(TEveRefBackPtr, 0);
};
#endif
Last update: Thu Jan 17 08:49:14 2008
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.