24#include <nlohmann/json.hpp>
29 struct TableDictHelper {
32 static size_t maxEnt = 3;
34 TIter next(
c->GetListOfAllPublicMethods());
35 while ((meth = (
TMethod *)next()) && entries.size() < maxEnt) {
38 std::string mn = meth->
GetName();
39 std::string exp =
"i." + mn +
"()";
56 TIter blnext(
c->GetListOfBases());
65 TIter blnext(
c->GetListOfBases());
67 auto bs = specs.find(base->
GetName());
68 if (bs != specs.end()) {
103 printf(
"REveTableViewInfo::AddNewColumnToCurrentCollection error: collection not found\n");
107 const char *rtyp =
"void";
109 std::function<
void(
void *)> fooptr;
111 s <<
"*((std::function<" << rtyp <<
"(" << icls->GetName() <<
"*)>*)" << std::hex << std::showbase
112 << (size_t)(&fooptr) <<
") = [](" << icls->GetName() <<
"* p){" << icls->GetName() <<
" &i=*p; return (" << expr
118 gROOT->ProcessLine(s.str().c_str(), &err);
120 std::cout <<
"REveTableViewInfo::AddNewColumnToCurrentCollection failed." << std::endl;
126 auto sit =
fSpecs.find(icls->GetName());
127 if (sit !=
fSpecs.end()) {
130 TableDictHelper helper;
132 std::string
n =
b->GetName();
133 for (REveTableHandle::Entries_t::iterator
e =
fSpecs[
n].begin();
e !=
fSpecs[
n].end(); ++
e) {
151 TableDictHelper helper;
152 auto search =
fSpecs.find(cname);
153 if (search !=
fSpecs.end()) {
154 return search->second;
typedef void(GLAPIENTRYP _GLUfuncptr)(void)
TClass * GetItemClass() const
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
REveElement * FindElementById(ElementId_t id) const
Lookup ElementId in element map and return corresponding REveElement*.
std::map< std::string, Entries_t > Specs_t
REveTableHandle & column(const std::string &name, int precision, const std::string &expression)
std::vector< REveTableEntry > Entries_t
REveTableViewInfo(const std::string &name="TableViewManager", const std::string &title="")
void SetDisplayedCollection(ElementId_t)
std::vector< Delegate_t > fDelegates
REveTableHandle::Specs_t fSpecs
REveTableHandle::Entries_t & RefTableEntries(std::string cname)
Find column definitions for given class name.
REveTableHandle table(std::string className)
void AddNewColumnToCurrentCollection(const char *expr, const char *title, int prec=2)
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
Each class (see TClass) has a linked list of its base class(es).
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Basic data type descriptor (datatype information is obtained from CINT).
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Each ROOT class (see TClass) has a linked list of methods.
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();.
virtual const char * GetName() const
Returns name of object.
R__EXTERN REveManager * gEve
basic_json< std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, adl_serializer, std::vector< std::uint8_t > > json