[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new agent compiling error
Hello,
I have a compiling error of a new agent "GrpKey".
The file source grpkey.cc contain :
#include "grpkey.h"
#include <iostream.h>
static class GrpKeyHeaderClass : public PacketHeaderClass {
public:
GrpKeyHeaderClass() : PacketHeaderClass("PacketHeader/GrpKey",
sizeof(hdr_grpkey)) {}
} class_grpkeyhdr;
static class GrpKeyClass : public TclClass {
public:
GrpKeyClass() : TclClass("Agent/GrpKey") {}
TclObject* create(int, const char*const*) {
return (new GrpKeyAgent());
}
} class_grpkey;
GrpKeyAgent::GrpKeyAgent() : Agent(PT_GRPKEY)
{
bind("packetSize_", &size_);
bind("off_grpkey_", &off_grpkey_);
}
int GrpKeyAgent::command(int argc, const char*const* argv) {...}
void GrpKeyAgent::recv(Packet* pkt, Handler*){...}
-------------------------------------------------------------------
compiling error is:
==================
grpkey.cc: In method `class TclObject * GrpKeyClass::create(int, const
char *const *)':
grpkey.cc:16: fields of `TclObject' are inaccessible in `GrpKeyAgent'
due to private inheritance
make: *** [grpkey.o] Error 1
I wonder why this error, I do here nearly the same code in ping.cc ?
I appreciate any help from you
Best regards
--
Ghassan