Updated comments of NexObject.

Signed-off-by: shennongmin <wupangfee@gmail.com>
This commit is contained in:
shennongmin
2015-08-14 14:30:00 +08:00
parent 14240e1905
commit 763a2e3dd2
2 changed files with 45 additions and 41 deletions

View File

@@ -14,68 +14,40 @@
*/
#include "NexObject.h"
/**
* Constructor
*
* @param pid - page id.
* @param cid - component id.
* @param name - component name.
*/
NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name)
{
this->pid = pid;
this->cid = cid;
this->name = name;
dbSerialPrintln("NexObject called");
this->__pid = pid;
this->__cid = cid;
this->__name = name;
}
/**
* Get page id.
*
* @return the id of page.
*/
uint8_t NexObject::getObjPid(void)
{
return pid;
return __pid;
}
/**
* Get component id.
*
* @return the id of component.
*/
uint8_t NexObject::getObjCid(void)
{
return cid;
return __cid;
}
/**
* Get component name.
*
* @return the name of component.
*/
const char* NexObject::getObjName(void)
{
return name;
return __name;
}
/**
* Print current object address,page id,component id,
* component name,pop event function address,push event function address.
*
*/
void NexObject::printObjInfo(void)
{
dbSerialPrint("[");
dbSerialPrint((uint32_t)this);
dbSerialPrint(":");
dbSerialPrint(pid);
dbSerialPrint(__pid);
dbSerialPrint(",");
dbSerialPrint(cid);
dbSerialPrint(__cid);
dbSerialPrint(",");
if (name)
if (__name)
{
dbSerialPrint(name);
dbSerialPrint(__name);
}
else
{