XTPSyntaxEditLexClassSubObjDef.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:7k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // XTPSyntaxEditLexClassSubObjDef.h
  2. //
  3. // This file is a part of the XTREME TOOLKIT PRO MFC class library.
  4. // (c)1998-2008 Codejock Software, All Rights Reserved.
  5. //
  6. // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
  7. // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
  8. // CONSENT OF CODEJOCK SOFTWARE.
  9. //
  10. // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
  11. // IN THE XTREME SYNTAX EDIT LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
  12. // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
  13. // SINGLE COMPUTER.
  14. //
  15. // CONTACT INFORMATION:
  16. // support@codejock.com
  17. // http://www.codejock.com
  18. //
  19. //////////////////////////////////////////////////////////////////////
  20. //{{AFX_CODEJOCK_PRIVATE
  21. #if !defined(__XTPSYNTAXEDITLEXCLASSSUBOBJDEF_H__)
  22. #define __XTPSYNTAXEDITLEXCLASSSUBOBJDEF_H__
  23. //}}AFX_CODEJOCK_PRIVATE
  24. #if _MSC_VER > 1000
  25. #pragma once
  26. #endif // _MSC_VER > 1000
  27. //#pragma warning(disable: 4097 4786)
  28. namespace XTPSyntaxEditLexAnalyser
  29. {
  30. //{{AFX_CODEJOCK_PRIVATE
  31. //===========================================================================
  32. #define XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(_Name, _str) inline LPCTSTR _Name() { return _str;}
  33. //===========================================================================
  34. #define XTP_EDIT_LEX_CLASS_OBJ_MEMBER(id, _member) public: 
  35. TBase::_Type##id _member; 
  36. protected: 
  37. virtual void SetSubMember##id() { 
  38. m_p##id = &_member; 
  39. }
  40. //===========================================================================
  41. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ_BASE_N1(subN1) 
  42. CXTPSyntaxEditLexObj_SpecCollT<CXTPSyntaxEditLexVariantPtrArrayExAutomatT<subN1> >
  43. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ_BASE_N2(subN1, subN2) 
  44. CXTPSyntaxEditLexObj_SpecCollT<CXTPSyntaxEditLexVariantPtrArrayExAutomatT<subN1>,
  45.  CXTPSyntaxEditLexVariantPtrArrayExAutomatT<subN2> >
  46. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ_BASE_N3(subN1, subN2, subN3) 
  47. CXTPSyntaxEditLexObj_SpecCollT<CXTPSyntaxEditLexVariantPtrArrayExAutomatT<subN1>, 
  48.  CXTPSyntaxEditLexVariantPtrArrayExAutomatT<subN2>, 
  49.  CXTPSyntaxEditLexVariantPtrArrayExAutomatT<subN3> >
  50. //===========================================================================
  51. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ(objClass, DEF_BASE_Nx) 
  52. class objClass: public DEF_BASE_Nx 
  53. {   
  54. public: 
  55. typedef DEF_BASE_Nx TBase; 
  56. objClass() { 
  57. SetSubMembers(); 
  58. }; 
  59. virtual ~objClass() {};
  60. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N1(objClass, subN1) 
  61. XTP_EDIT_DEFINE_LEX_CLASS_OBJ(objClass, 
  62. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_BASE_N1(subN1) )
  63. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N2(objClass, subN1, subN2) 
  64. XTP_EDIT_DEFINE_LEX_CLASS_OBJ(objClass, 
  65. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_BASE_N2(subN1, subN2) )
  66. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N3(objClass, subN1, subN2, subN3) 
  67. XTP_EDIT_DEFINE_LEX_CLASS_OBJ(objClass, 
  68. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_BASE_N3(subN1, subN2, subN3) )
  69. //===========================================================================
  70. #define XTP_EDIT_DEFINE_LEX_CLASS_OBJ_END };
  71. ////////////////////////////////////////////////////////////////////////////
  72. //= Prevoius =============================================================
  73. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_previous_class,  _T("previous:class"))
  74. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_previous_tag,    _T("previous:tag"))
  75. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_previous_tag_separators, _T("previous:tag:separators"))
  76. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N3(CXTPSyntaxEditLexObj_Previous, FnName_previous_class,
  77. FnName_previous_tag, FnName_previous_tag_separators)
  78. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(0, m_class)
  79. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(1, m_tag)
  80. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(2, m_tag_separators)
  81. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_END
  82. //= Start ================================================================
  83. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_start_class, _T("start:class"))
  84. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_start_tag,    _T("start:tag"))
  85. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N2(CXTPSyntaxEditLexObj_Start, FnName_start_class, FnName_start_tag)
  86. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(0, m_class)
  87. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(1, m_tag)
  88. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_END
  89. //= End ================================================================
  90. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_end_class,       _T("end:class"))
  91. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_end_tag,     _T("end:tag"))
  92. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_end_separators,  _T("end:separators"))
  93. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N3(CXTPSyntaxEditLexObj_End, FnName_end_class, FnName_end_tag, FnName_end_separators)
  94. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(0, m_class)
  95. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(1, m_tag)
  96. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(2, m_separators)
  97. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_END
  98. //= Token ================================================================
  99. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_tokeFnName_tag,              _T("token:tag"))
  100. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_tokeFnName_start_separators,_T("token:start:separators"))
  101. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_tokeFnName_end_separators,   _T("token:end:separators"))
  102. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N3(CXTPSyntaxEditLexObj_Token, FnName_tokeFnName_tag,
  103. FnName_tokeFnName_start_separators, FnName_tokeFnName_end_separators)
  104. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(0, m_tag)
  105. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(1, m_start_separators)
  106. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(2, m_end_separators)
  107. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_END
  108. //= Skip ================================================================
  109. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_skip_tag, _T("skip:tag"))
  110. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_N1(CXTPSyntaxEditLexObj_Skip, FnName_skip_tag)
  111. XTP_EDIT_LEX_CLASS_OBJ_MEMBER(0, m_tag)
  112. XTP_EDIT_DEFINE_LEX_CLASS_OBJ_END
  113. //= active tags (INTERNAL OBJECT) ================================================================
  114. XTP_EDIT_LEX_CLASS_OBJ_MEMBER_NAME(FnName_active_tags, _T("_active_tags"))
  115. class CXTPSyntaxEditLexObj_ActiveTags : public CXTPSyntaxEditLexVariantPtrArrayExAutomatT<FnName_active_tags>
  116. {
  117. typedef CXTPSyntaxEditLexVariantPtrArrayExT<FnName_active_tags> TBase;
  118. public:
  119. virtual ~CXTPSyntaxEditLexObj_ActiveTags(){};
  120. };
  121. //}}AFX_CODEJOCK_PRIVATE
  122. ////////////////////////////////////////////////////////////////////////////
  123. }
  124. ////////////////////////////////////////////////////////////////////////////
  125. #endif // !defined(__XTPSYNTAXEDITLEXCLASSSUBOBJDEF_H__)