enterprise architect逆向工程的提示parse error

maguic 2012-06-13 03:35:26
用enterprise architect代码导出类图的时候,在类CORE_EXPORTABLE ClientSession
声明下一行处(即'{'处)提示“parse error”,各位有何高见?
源代码:
#ifndef _nms_core_h_
#define _nms_core_h_

#ifdef _WIN32
#ifdef NXCORE_EXPORTS
#define NXCORE_EXPORTABLE __declspec(dllexport)
#else
#define NXCORE_EXPORTABLE __declspec(dllimport)
#endif
#else /* _WIN32 */
#define NXCORE_EXPORTABLE
#endif

#define LIBNXCL_NO_DECLARATIONS 1

#include <nms_common.h>

#ifndef _WIN32

#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif

#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif

#define WSAGetLastError() (errno)

#endif /* _WIN32 */

#include <time.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>

#define SHOW_FLAG_VALUE(x) _T(" %-32s = %d\n"), _T(#x), (g_dwFlags & x) ? 1 : 0


//
// Common includes
//

#include <nms_util.h>
#include <dbdrv.h>
#include <nms_cscp.h>
#include <uuid.h>
#include <nxsrvapi.h>
#include <nxqueue.h>
#include <nxsnmp.h>
#include <nxmodule.h>
#include <nxsl.h>
#include <nxdbapi.h>
#include <nddrv.h>
#include <nxcore_smclp.h>


//
// Console context
//

struct __console_ctx
{
SOCKET hSocket;
MUTEX socketMutex;
CSCPMessage *pMsg;
ClientSession *session;
};

typedef __console_ctx * CONSOLE_CTX;


//
// Server includes
//

#include "nms_dcoll.h"
#include "nms_users.h"
#include "nms_objects.h"
#include "nms_locks.h"
#include "nms_pkg.h"
#include "nms_topo.h"
#include "nms_script.h"
#include "nxcore_situations.h"
#include "nxcore_jobs.h"
#include "nxcore_logs.h"


//
// Common constants and macros
//

#define MAX_LINE_SIZE 4096
#define GROUP_FLAG_BIT ((DWORD)0x80000000)
#define CHECKPOINT_SNMP_PORT 260
#define DEFAULT_AFFINITY_MASK 0xFFFFFFFF

typedef void * HSNMPSESSION;


//
// Prefixes for poller messages
//

#define POLLER_ERROR _T("\x7F") _T("e")
#define POLLER_WARNING _T("\x7Fw")
#define POLLER_INFO _T("\x7Fi")


//
// Unique identifier group codes
//

#define IDG_NETWORK_OBJECT 0
#define IDG_CONTAINER_CAT 1
#define IDG_EVENT 2
#define IDG_ITEM 3
#define IDG_SNMP_TRAP 4
#define IDG_JOB 5
#define IDG_ACTION 6
#define IDG_EVENT_GROUP 7
#define IDG_THRESHOLD 8
#define IDG_USER 9
#define IDG_USER_GROUP 10
#define IDG_ALARM 11
#define IDG_ALARM_NOTE 12
#define IDG_PACKAGE 13
#define IDG_SLM_TICKET 14
#define IDG_OBJECT_TOOL 15
#define IDG_SCRIPT 16
#define IDG_AGENT_CONFIG 17
#define IDG_GRAPH 18
#define IDG_CERTIFICATE 19
#define IDG_SITUATION 20


//
// Exit codes for console commands
//

#define CMD_EXIT_CONTINUE 0
#define CMD_EXIT_CLOSE_SESSION 1
#define CMD_EXIT_SHUTDOWN 2


//
// Network discovery mode
//

#define DISCOVERY_DISABLED 0
#define DISCOVERY_PASSIVE_ONLY 1
#define DISCOVERY_ACTIVE 2


//
// Client session flags
//

#define CSF_EPP_LOCKED ((DWORD)0x0002)
#define CSF_PACKAGE_DB_LOCKED ((DWORD)0x0004)
#define CSF_USER_DB_LOCKED ((DWORD)0x0008)
#define CSF_EPP_UPLOAD ((DWORD)0x0010)
#define CSF_CONSOLE_OPEN ((DWORD)0x0020)
#define CSF_AUTHENTICATED ((DWORD)0x0080)
#define CSF_RECEIVING_MAP_DATA ((DWORD)0x0200)
#define CSF_SYNC_OBJECT_COMMENTS ((DWORD)0x0400)


//
// Client session states
//

#define SESSION_STATE_INIT 0
#define SESSION_STATE_IDLE 1
#define SESSION_STATE_PROCESSING 2


//
// Information categories for UPDATE_INFO structure
//

#define INFO_CAT_EVENT 1
#define INFO_CAT_OBJECT_CHANGE 2
#define INFO_CAT_ALARM 3
#define INFO_CAT_ACTION 4
#define INFO_CAT_SYSLOG_MSG 5
#define INFO_CAT_SNMP_TRAP 6
#define INFO_CAT_AUDIT_RECORD 7
#define INFO_CAT_SITUATION 8


//
// Certificate types
//

#define CERT_TYPE_TRUSTED_CA 0
#define CERT_TYPE_USER 1


//
// Audit subsystems
//

#define AUDIT_SECURITY _T("SECURITY")
#define AUDIT_OBJECTS _T("OBJECTS")
#define AUDIT_SYSCFG _T("SYSCFG")
#define AUDIT_CONSOLE _T("CONSOLE")


//
// Event handling subsystem definitions
//

#include "nms_events.h"
#include "nms_actions.h"
#include "nms_alarm.h"


//
// New node information
//

typedef struct
{
DWORD dwIpAddr;
DWORD dwNetMask;
DWORD zoneId;
BOOL ignoreFilter;
} NEW_NODE;


//
// New node flags
//

#define NNF_IS_SNMP 0x0001
#define NNF_IS_AGENT 0x0002
#define NNF_IS_ROUTER 0x0004
#define NNF_IS_BRIDGE 0x0008
#define NNF_IS_PRINTER 0x0010
#define NNF_IS_CDP 0x0020
#define NNF_IS_SONMP 0x0040
#define NNF_IS_LLDP 0x0080


//
// Node information for autodiscovery filter
//

typedef struct
{
DWORD dwIpAddr;
DWORD dwNetMask;
DWORD dwSubnetAddr;
DWORD dwFlags;
int nSNMPVersion;
TCHAR szObjectId[MAX_OID_LEN * 4]; // SNMP OID
TCHAR szAgentVersion[MAX_AGENT_VERSION_LEN];
TCHAR szPlatform[MAX_PLATFORM_NAME_LEN];
} DISCOVERY_FILTER_DATA;


//
// Data update structure for client sessions
//

typedef struct
{
DWORD dwCategory; // Data category - event, network object, etc.
DWORD dwCode; // Data-specific update code
void *pData; // Pointer to data block
} UPDATE_INFO;


//
// Extended agent connection
//

class AgentConnectionEx : public AgentConnection
{
protected:
virtual void onTrap(CSCPMessage *msg);
virtual void onDataPush(CSCPMessage *msg);

public:
AgentConnectionEx(DWORD dwAddr, WORD wPort = AGENT_LISTEN_PORT,
int iAuthMethod = AUTH_NONE, TCHAR *pszSecret = NULL) :
AgentConnection(dwAddr, wPort, iAuthMethod, pszSecret) { }
virtual ~AgentConnectionEx();

DWORD deployPolicy(AgentPolicy *policy);
DWORD uninstallPolicy(AgentPolicy *policy);
};


//
// Client session
//

#define DECLARE_THREAD_STARTER(func) static THREAD_RESULT THREAD_CALL ThreadStarter_##func(void *);

class NXCORE_EXPORTABLE ClientSession
{
}
...全文
300 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
W170532934 2012-06-13
  • 打赏
  • 举报
回复
好长的代码。我路过。学习的

64,648

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧