[AGENT++] code puzzles
xiao.zhibin at zte.com.cn
xiao.zhibin at zte.com.cn
Fri Jun 2 10:13:58 CEST 2006
Hi everyOne:
Today, I have taken a look at notification_log_mib.cpp.When I came to the
nlmLogEntry function,I was confused by the code as below
nlmLogEntry::nlmLogEntry():
MibTable(oidNlmLogEntry, indNlmLogEntry, 2)
{
// This table object is a singleton. In order to access it use
// the static pointer nlmLogEntry::instance.
instance = this;
add_col(new MibLeaf(colNlmLogTime, READONLY, new TimeTicks()));
add_col(new MibLeaf(colNlmLogDateAndTime, READONLY, new
OctetStr()));
add_col(new MibLeaf(colNlmLogEngineID, READONLY, new OctetStr()));
add_col(new MibLeaf(colNlmLogEngineTAddress, READONLY, new
OctetStr()));
add_col(new MibLeaf(colNlmLogEngineTDomain, READONLY, new
Oid1()));
add_col(new MibLeaf(colNlmLogContextEngineID, READONLY, new
OctetStr()));
add_col(new MibLeaf(colNlmLogContextName, READONLY, new
OctetStr()));
add_col(new MibLeaf(colNlmLogNotificationID, READONLY, new
Oid1()));
//--AgentGen BEGIN=nlmLogEntry::nlmLogEntry
#ifdef _WIN32
generator.get_nth(1)->set_access(NOACCESS);
#else
replace_col(nNlmLogDateAndTime,
new DateAndTime(colNlmLogDateAndTime, READONLY,
VMODE_DEFAULT));
nlmConfigLogEntry::instance->add_listener(this);
#endif
//--AgentGen END
According to the RFC, I came to know Table nlmLogEntry should regeister
itself as a listener of table nlmConfigEntry,
But seen from the current code ,I felt that it dosen't work in that way
under the platform of MS windows,since the usage of
ifdef _WIN32
...
#else
...
#endif
I really hope someone will offer me a detailed explaination to theses
lines of coding.
Thanks in Advance.
SHAW
}
******************************
tel:0755-26773000-6227
mobile:13794495928
******************************
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is solely property of the sender's organization. This mail communication is confidential. Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
More information about the AGENTPP
mailing list