+
+
+#define NLITE_READ_USER_STRING(at,l,t) if(_tcscmp(at[0],TEXT(#t)) == 0)l.t = at[1]
+#define NLITE_READ_USER_INT(at,l,t) if(_tcscmp(at[0],TEXT(#t))==0)l.t = _tcstol((const wchar_t*)at[1],NULL,10)
+
+ void ReadUserSettingXML::OnStartElement (const XML_Char *pszName, const XML_Char **papszAttrs){
+
+ if(_tcscmp(pszName,TEXT("user")) == 0){
+
+ this->userNodeFlag = TRUE;
+
+
+ for(;papszAttrs[0] != NULL;papszAttrs += 2){
+
+ NLITE_READ_USER_STRING(papszAttrs,listenerBuff,name);
+ NLITE_READ_USER_STRING(papszAttrs,listenerBuff,community);
+ NLITE_READ_USER_INT(papszAttrs,listenerBuff,bgcolor);
+ NLITE_READ_USER_INT(papszAttrs,listenerBuff,time);
+
+ }
+
+ }
+
+ return;
+ }
+
+ void ReadUserSettingXML::OnEndElement (const XML_Char *pszName){
+
+ if(_tcscmp(pszName,TEXT("user")) == 0){
+
+ listenerList.Register(listenerBuff,TRUE);
+ this->userNodeFlag = FALSE;
+ this->listenerBuff.~ListenerData();
+ new(&listenerBuff) ListenerData();
+
+ }
+
+ return;
+ }
+
+ void ReadUserSettingXML::OnCharacterData (const XML_Char *pszData, int nLength){
+
+ if(this->userNodeFlag == TRUE){
+
+
+ listenerBuff.user_id.Append(pszData,nLength);
+
+
+
+
+ }
+
+
+
+ return;
+ }
+