81 if (!fReady || !fCanv)
return;
99 while ((m = (
TMethod*) iter()) != 0) {
100 if (cnt++ > 0) buf.
Append(
",");
109 if (strncmp(m->
GetName(),
"Set",3)==0) {
128 printf(
"Cannot get toggle value with getter %s \n", getter.
Data());
162 const char* cdata = (
const char*) arg->
GetPostData();
164 if (strncmp(cdata,
"READY",5)==0) {
170 if (strncmp(cdata,
"GETMENU",7)==0) {
176 if (strncmp(cdata,
"EXEC",4)==0) {
181 exec.
Form(
"((%s*) %p)->%s;", fCanv->ClassName(), fCanv, cdata+4);
184 gROOT->ProcessLine(exec);
200 fCanv->Disconnect(
"Modified()",
this,
"CanvasModified()");
201 fCanv->GetListOfPrimitives()->Remove(
this);
207 canv->
Connect(
"Modified()",
"THttpWSEngine",
this,
"CanvasModified()");
virtual const char * GetName() const
Returns name of object.
TList * GetListOfPrimitives() const
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * Getter() const
virtual void ProcessData(THttpCallArg *arg)
process data received from the client
static const EReturnType kLong
void * GetPostData() const
virtual void AssignCanvas(TCanvas *canv)
assign canvas to the web socket connects with CanvasModified signal
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
virtual ~THttpEngine()
destructor
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
The TNamed class is the base class for all named ROOT classes.
TString & Append(const char *cs)
Method or function calling interface.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
void CheckModifiedFlag()
canvas associated with websocket
The ROOT global object gROOT contains a list of all defined classes.
static TString ConvertToJSON(const TObject *obj, Int_t compact=0, const char *member_name=0)
converts object, inherited from TObject class, to JSON string
EMenuItemKind IsMenuItem() const
virtual void CanvasModified()
react on canvas modifications
virtual ~THttpWSEngine()
destructor
virtual void Add(TObject *obj)
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
Each ROOT class (see TClass) has a linked list of methods.
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
Long_t GetPostDataLength() const
EReturnType ReturnType()
Returns the return type of the method.
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const