Hello,
I'll post this answer to roottalk. The question is how to use following
pragma statements which are not described in ROOT documentation.
#pragma link MACRO function [funcname];
#pragma link [C++|C|off] nestedclass;
#pragma link [C++|C|off] nestedtypedef;
1) #pragma link MACRO [funcname];
This pragma behaves the same as '#pragma link C++ function [funcname];'
except it does not refer to function pointer. Consider following case,
double func(double x) { return(x*x); }
#define mac(x) (x*x)
You can refer 'func' as pointer to function, but can not do so for
'mac'. '#pragma link MACRO function [funcname];' prevents this.
Above case, following LinkDef statements are recommended.
#pragma link C++ function func;
#pragma link MACRO function mac;
2) #pragma link [C++|C|off] [nestedclass|nestedtypedef];
THese pragma statements turns on/off dictionary generation for nested
classes and typedefs. For example,
class A {
public:
class B {
int b;
};
typedef int Int_t;
};
Without '#pragma link C++ nestedclass;' A::B is not visible from
the interpreter. Likewise, nestedtypedef for Int_t. If you need to
access these types, following LinkDef statements are needed.
#pragma link C++ nestedclass;
#pragma link C++ nestedtypedef;
This is documented in cint source package doc/ref.txt.
Thank you
Masaharu Goto
>Dear Masaharu, one more question.
>I see in the cint code but never saw in ROOT
>that cint can handle MACRO functions, nestedclasses.
> Could do you make example how to use it?
>Thanks. With best regards, Valery
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:39 MET