home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 November / VPR9611B.ISO / vabasic / ntclnt.exe / DISK8 / data.8 / datab / INCLUDE / VWREGGEN.HH < prev    next >
Text File  |  1996-07-29  |  20KB  |  507 lines

  1. /*------------------------------------------------------------------------
  2.  * $Source: /rcs/vwrcs/integration/vwreggen.hh,v $
  3.  * $Date: 1996/06/08 19:00:52 $                 $Revision: 1.28 $
  4.  *
  5.  * Copyright 1992, Visual Edge Software Ltd.
  6.  * -----------------------------------------
  7.  * ALL RIGHTS RESERVED.  This notice is intended as a precaution against
  8.  * inadvertent publication, and shall not be deemed to constitute an 
  9.  * acknowledgment that publication has  occurred nor to imply any waiver  
  10.  * of confidentiality.    The year included in the notice is the year 
  11.  * of the creation of the work.               
  12.  *------------------------------------------------------------------------
  13.  * Visual Windows component integration support.
  14.  *
  15.  * Macros for event and property registration.
  16.  * 
  17.  * The published interface for registration is in VwPop.hh.
  18.  * Registering a class means writing glue routines for every
  19.  * property and event, and writing a lot of stylized code
  20.  * to register those classes.
  21.  *
  22.  * This file, in conjunction with component specification files
  23.  * to register the VwPop calls to register the method and events.
  24.  *
  25.  * This is strictly VE internal; the VwPop.hh interface will be public.
  26.  *
  27.  * Include this file inside the registration function for the class,
  28.  * after defining CLASS_FILE to the name of the specification file
  29.  * for the class (such as Comp.sp)
  30.  *------------------------------------------------------------------------*/
  31.  
  32. #include <vwalias.hh>
  33.  
  34. #define VeProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  35.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  36.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  37.     FUNCTOVP(C_CLASS_NAME ## NAME), FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  38.  
  39. #define VPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  40.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  41.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  42.     FUNCTOVP(C_CLASS_NAME ## NAME), FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  43.  
  44. #define VObjectProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  45.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  46.     BASIC_TYPE, 0, FUNCTOVP(C_CLASS_NAME ## NAME), \
  47.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  48.  
  49. #define VObjectPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  50.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  51.     BASIC_TYPE, 0, FUNCTOVP(C_CLASS_NAME ## NAME), \
  52.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  53.  
  54. #define VPropertyWithUsage(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE, USAGE) \
  55.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  56.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  57.     FUNCTOVP(C_CLASS_NAME ## NAME), \
  58.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  59.  
  60. #define VPropertyWithUsageOverride(C_CLASS_NAME, NAME, TYPE,BASIC_TYPE,USAGE) \
  61.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  62.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  63.     FUNCTOVP(C_CLASS_NAME ## NAME), \
  64.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  65.  
  66. #define VObjectPropertyWithUsage(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE, USAGE) \
  67.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  68.     BASIC_TYPE, USAGE, FUNCTOVP(C_CLASS_NAME ## NAME),\
  69.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  70.  
  71. #define VObjectPropertyWithUsageOverride(C_CLASS_NAME,NAME,TYPE,BASIC_TYPE,USAGE) \
  72.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  73.     BASIC_TYPE, USAGE, FUNCTOVP(C_CLASS_NAME ## NAME),\
  74.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  75.  
  76. #define VArrayProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  77.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,\
  78.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  79.     FUNCTOVP(C_CLASS_NAME ## NAME), \
  80.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME), \
  81.     VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  82.     VEndList);
  83.  
  84. #define VArrayPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  85.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,\
  86.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  87.     FUNCTOVP(C_CLASS_NAME ## NAME), \
  88.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME), \
  89.     VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  90.     VEndList);
  91.  
  92. #define VReadOnlyArrayProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  93.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  94.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  95.     FUNCTOVP(C_CLASS_NAME ## NAME), 0, \
  96.     VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  97.     VEndList);
  98.  
  99. #define VReadOnlyArrayPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  100.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  101.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  102.     FUNCTOVP(C_CLASS_NAME ## NAME), 0, \
  103.     VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  104.     VEndList);
  105.  
  106. #define VReadOnlyProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  107.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  108.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  109.     FUNCTOVP(C_CLASS_NAME ## NAME));
  110.  
  111. #define VReadOnlyPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  112.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  113.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  114.     FUNCTOVP(C_CLASS_NAME ## NAME));
  115.  
  116. #define VReadOnlyPropertyWithUsage(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE, USAGE) \
  117.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  118.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  119.     FUNCTOVP(C_CLASS_NAME ## NAME));
  120.  
  121. #define VReadOnlyPropertyWithUsageOverride(C_CLASS_NAME, NAME, TYPE,BASIC_TYPE,USAGE) \
  122.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls, \
  123.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  124.     FUNCTOVP(C_CLASS_NAME ## NAME));
  125.  
  126. #define VReadOnlyObjectProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  127.         VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,\
  128.         VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0, \
  129.     FUNCTOVP(C_CLASS_NAME ## NAME));
  130.  
  131. #define VReadOnlyObjectPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  132.         VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,\
  133.         VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0, \
  134.     FUNCTOVP(C_CLASS_NAME ## NAME));
  135.  
  136.  
  137. #define VDesignOnlyProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  138.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  139.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0);
  140.  
  141. #define VDesignOnlyPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  142.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  143.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0);
  144.  
  145. #define VDesignOnlyObjectProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  146.         VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,\
  147.         VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0);
  148.  
  149. #define VDesignOnlyObjectPropertyOverride(C_CLASS_NAME, NAME,TYPE,BASIC_TYPE) \
  150.         VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,\
  151.         VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0);
  152.  
  153. #define VeEvent(NAME) VREGISTRY->AddEvent(#NAME, p ## C_CLASS_NAME ## Cls, \
  154.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME),
  155.  
  156. #define VEventArg(C_CLASS_NAME, NAME,TYPE,USAGE)  VREGISTRY->Argument(#NAME, VREGISTRY->LookupType(kVType ## TYPE), USAGE),
  157.  
  158. #define VEndArgs                VwEndList);
  159. #define VNoProperty(C_CLASS_NAME, NAME)    VREGISTRY->RevokeProperty(p ## C_CLASS_NAME ## Cls, #NAME);
  160.  
  161. #define VSymbolProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  162.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  163.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  164.     FUNCTOVP(C_CLASS_NAME ## NAME), \
  165.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  166.  
  167. #define VSymbolPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  168.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  169.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  170.     FUNCTOVP(C_CLASS_NAME ## NAME), \
  171.     FUNCTOVP(C_CLASS_NAME ## Put ## NAME));
  172.  
  173. #define VReadOnlySymbolProperty(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  174.     VREGISTRY->AddProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  175.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  176.     FUNCTOVP(C_CLASS_NAME ## NAME));
  177.  
  178. #define VReadOnlySymbolPropertyOverride(C_CLASS_NAME, NAME, TYPE, BASIC_TYPE) \
  179.     VREGISTRY->OverrideProperty (#NAME, p ## C_CLASS_NAME ## Cls,  \
  180.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  181.     FUNCTOVP(C_CLASS_NAME ## NAME));
  182.  
  183. // Old fashion macros
  184.  
  185. #define Property(NAME, TYPE, BASIC_TYPE) \
  186.     VREGISTRY->AddProperty (#NAME, cls,  \
  187.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  188.     FUNCTOVP(NAME), \
  189.     FUNCTOVP(Put ## NAME));
  190.  
  191. #define IMEProperty(NAME, TYPE, BASIC_TYPE) \
  192.     if(MB_CUR_MAX > 1) { \
  193.         VREGISTRY->AddProperty (#NAME, cls,  \
  194.         VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  195.         FUNCTOVP(NAME), \
  196.         FUNCTOVP(Put ## NAME));\
  197.     }
  198.  
  199. #define PropertyOverride(NAME, TYPE, BASIC_TYPE) \
  200.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  201.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  202.     FUNCTOVP(NAME), \
  203.     FUNCTOVP(Put ## NAME));
  204.  
  205. #define NamedProperty(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  206.     VREGISTRY->AddProperty (#VISIBLE_NAME, cls,  \
  207.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  208.     FUNCTOVP(NAME), \
  209.     FUNCTOVP(Put ## NAME));
  210.  
  211. #define NamedPropertyOverride(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  212.     VREGISTRY->OverrideProperty (#VISIBLE_NAME, cls,  \
  213.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  214.     FUNCTOVP(NAME), \
  215.     FUNCTOVP(Put ## NAME));
  216.  
  217. #define ObjectProperty(NAME, TYPE, BASIC_TYPE) \
  218.     VREGISTRY->AddProperty (#NAME, cls,  \
  219.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0, \
  220.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  221.  
  222. #define ObjectPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  223.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  224.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0, \
  225.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  226.  
  227. #define PropertyWithUsage(NAME, TYPE, BASIC_TYPE, USAGE) \
  228.     VREGISTRY->AddProperty (#NAME, cls,  \
  229.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  230.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  231.  
  232. #define PropertyWithUsageOverride(NAME, TYPE, BASIC_TYPE, USAGE) \
  233.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  234.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  235.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  236.  
  237. #define NamedPropertyWithUsage(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE, USAGE) \
  238.     VREGISTRY->AddProperty (#VISIBLE_NAME, cls,  \
  239.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  240.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  241.  
  242. #define NamedPropertyWithUsageOverride(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE, USAGE) \
  243.     VREGISTRY->OverrideProperty (#VISIBLE_NAME, cls,  \
  244.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  245.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  246.  
  247. #define ObjectPropertyWithUsage(NAME, TYPE, BASIC_TYPE, USAGE) \
  248.     VREGISTRY->AddProperty (#NAME, cls,  \
  249.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), USAGE, \
  250.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  251.  
  252. #define ObjectPropertyWithUsageOverride(NAME, TYPE, BASIC_TYPE, USAGE) \
  253.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  254.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), USAGE, \
  255.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  256.  
  257. #define ArrayProperty(NAME, TYPE, BASIC_TYPE) \
  258.         VREGISTRY->AddProperty (#NAME, cls, \
  259.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  260.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME), \
  261.     VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  262.     VEndList);
  263.  
  264. #define ArrayPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  265.         VREGISTRY->OverrideProperty (#NAME, cls, \
  266.         VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  267.         FUNCTOVP(NAME), FUNCTOVP(Put ## NAME), \
  268.         VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  269.     VEndList);
  270.  
  271. #define NamedArrayProperty(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  272.         VREGISTRY->AddProperty (#VISIBLE_NAME, cls, \
  273.         VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  274.         FUNCTOVP(NAME), FUNCTOVP(Put ## NAME), \
  275.         VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  276.     VEndList);
  277.  
  278. #define NamedArrayPropertyOverride(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  279.         VREGISTRY->OverrideProperty (#VISIBLE_NAME, cls, \
  280.         VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  281.         FUNCTOVP(NAME), FUNCTOVP(Put ## NAME), \
  282.         VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  283.     VEndList);
  284.  
  285. #define ReadOnlyArrayProperty(NAME, TYPE, BASIC_TYPE) \
  286.         VREGISTRY->AddProperty (#NAME, cls, \
  287.         VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  288.         FUNCTOVP(NAME), \
  289.     0, \
  290.         VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  291.     VEndList);
  292.  
  293. #define ReadOnlyArrayPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  294.         VREGISTRY->OverrideProperty (#NAME, cls, \
  295.         VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  296.         FUNCTOVP(NAME), \
  297.     0, \
  298.         VREGISTRY->Argument("index", VREGISTRY->LookupType(kVTypeShort), 0), \
  299.     VEndList);
  300.  
  301. #define ReadOnlyProperty(NAME, TYPE, BASIC_TYPE) \
  302.     VREGISTRY->AddProperty (#NAME, cls,  \
  303.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  304.     FUNCTOVP(NAME));
  305.  
  306. #define ReadOnlyPropertyWithUsage(NAME, TYPE, BASIC_TYPE, USAGE) \
  307.     VREGISTRY->AddProperty (#NAME, cls,  \
  308.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  309.     FUNCTOVP(NAME));
  310.  
  311. #define ReadOnlyPropertyWithUsageOverride(NAME, TYPE, BASIC_TYPE, USAGE) \
  312.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  313.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), USAGE, \
  314.     FUNCTOVP(NAME));
  315.  
  316. #define ReadOnlyPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  317.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  318.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  319.     FUNCTOVP(NAME));
  320.  
  321. #define NamedReadOnlyProperty(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  322.     VREGISTRY->AddProperty (#VISIBLE_NAME, cls,  \
  323.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  324.     FUNCTOVP(NAME));
  325.  
  326. #define NamedReadOnlyPropertyOverride(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  327.     VREGISTRY->OverrideProperty (#VISIBLE_NAME, cls,  \
  328.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  329.     FUNCTOVP(NAME));
  330.  
  331. #define ReadOnlyObjectProperty(NAME, TYPE, BASIC_TYPE) \
  332.     VREGISTRY->AddProperty (#NAME, cls,  \
  333.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0, \
  334.     FUNCTOVP(NAME));
  335.  
  336. #define ReadOnlyObjectPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  337.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  338.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0, \
  339.     FUNCTOVP(NAME));
  340.  
  341. #define ReadOnlyObjectPropertyWithUsage(NAME, TYPE, BASIC_TYPE, USAGE) \
  342.     VREGISTRY->AddProperty (#NAME, cls,  \
  343.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), USAGE, \
  344.     FUNCTOVP(NAME));
  345.  
  346. #define ReadOnlyObjectPropertyWithUsageOverride(NAME, TYPE, BASIC_TYPE, USAGE) \
  347.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  348.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), USAGE, \
  349.     FUNCTOVP(NAME));
  350.  
  351. #define DesignOnlyProperty(NAME, TYPE, BASIC_TYPE) \
  352.     VREGISTRY->AddProperty (#NAME, cls,  \
  353.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0);
  354.  
  355. #define NamedDesignOnlyProperty(NAME, VISIBLE_NAME,TYPE, BASIC_TYPE) \
  356.     VREGISTRY->AddProperty (#VISIBLE_NAME, cls,  \
  357.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0);
  358.  
  359. #define DesignOnlyPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  360.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  361.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0);
  362.  
  363. #define DesignOnlyObjectProperty(NAME, TYPE, BASIC_TYPE) \
  364.     VREGISTRY->AddProperty (#NAME, cls,  \
  365.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0);
  366.  
  367. #define NamedDesignOnlyObjectProperty(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  368.     VREGISTRY->AddProperty (#VISIBLE_NAME, cls,  \
  369.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0);
  370.  
  371. #define DesignOnlyObjectPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  372.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  373.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0);
  374.  
  375. #define NamedDesignOnlyObjectPropertyOverride(NAME, VISIBLE_NAME, TYPE, BASIC_TYPE) \
  376.     VREGISTRY->OverrideProperty (#VISIBLE_NAME, cls,  \
  377.     VREGISTRY->LookupClass(#BASIC_TYPE)->Type(), 0);
  378.  
  379. #define Event(NAME) VREGISTRY->AddEvent(#NAME, cls, \
  380.     FUNCTOVP(Put ## NAME),
  381.  
  382. #define EventArg(NAME,TYPE,USAGE)  VREGISTRY->Argument(#NAME, \
  383.     VREGISTRY->LookupType(kVType ## TYPE), USAGE),
  384.  
  385. #define EndArgs                VwEndList);
  386.  
  387. #define NamedEvent(NAME, VISIBLE_NAME) VREGISTRY->AddEvent(#VISIBLE_NAME, cls, \
  388.     FUNCTOVP(Put ## NAME),
  389.  
  390. #define NamedEventArg(NAME,VISIBLE_NAME,TYPE,USAGE)  VREGISTRY->Argument(#VISIBLE_NAME, \
  391.     VREGISTRY->LookupType(kVType ## TYPE), USAGE),
  392.  
  393. #define NamedEndArgs                VwEndList);
  394.  
  395. #define NoProperty(NAME) VREGISTRY->RevokeProperty(cls, #NAME);
  396. #define NoIMEProperty(NAME) \
  397.     if(MB_CUR_MAX > 1) { \
  398.         VREGISTRY->RevokeProperty(cls, #NAME); \
  399.     }
  400.  
  401. #define NamedNoProperty(NAME, VISIBLE_NAME) VREGISTRY->RevokeProperty(cls, #VISIBLE_NAME);
  402.  
  403. #define SymbolProperty(NAME, TYPE, BASIC_TYPE) \
  404.     VREGISTRY->AddProperty (#NAME, cls,  \
  405.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  406.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  407.  
  408. #define SymbolPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  409.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  410.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  411.     FUNCTOVP(NAME), FUNCTOVP(Put ## NAME));
  412.  
  413. #define ReadOnlySymbolProperty(NAME, TYPE, BASIC_TYPE) \
  414.     VREGISTRY->AddProperty (#NAME, cls,  \
  415.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  416.     FUNCTOVP(NAME));
  417.  
  418. #define ReadOnlySymbolPropertyOverride(NAME, TYPE, BASIC_TYPE) \
  419.     VREGISTRY->OverrideProperty (#NAME, cls,  \
  420.     VREGISTRY->LookupType(kVType ## BASIC_TYPE), 0, \
  421.     FUNCTOVP(NAME));
  422.  
  423. #include CLASS_FILE
  424.  
  425. #undef VeProperty
  426. #undef VPropertyOverride
  427. #undef VPropertyWithUsage
  428. #undef VPropertyWithUsageOverride
  429. #undef VArrayProperty
  430. #undef VArrayPropertyOverride
  431. #undef VReadOnlyArrayProperty
  432. #undef VReadOnlyArrayPropertyOverride
  433. #undef VReadOnlyProperty
  434. #undef VReadOnlyPropertyOverride
  435. #undef VReadOnlyPropertyWithUsage
  436. #undef VReadOnlyPropertyWithUsageOverride
  437. #undef VReadOnlyObjectProperty
  438. #undef VReadOnlyObjectPropertyOverride
  439. #undef VDesignOnlyProperty
  440. #undef VDesignOnlyPropertyOverride
  441. #undef VSymbolProperty
  442. #undef VSymbolPropertyOverride
  443. #undef VReadOnlySymbolProperty
  444. #undef VReadOnlySymbolPropertyOverride
  445. #undef VeEvent
  446. #undef VEventArg
  447. #undef VEndArgs
  448. #undef VNoProperty
  449.  
  450. #undef VObjectProperty
  451. #undef VObjectPropertyOverride
  452. #undef VObjectPropertyWithUsage
  453. #undef VObjectPropertyWithUsageOverride
  454. #undef VDesignOnlyObjectProperty
  455. #undef VDesignOnlyObjectPropertyOverride
  456.  
  457. #undef Property
  458. #undef NamedProperty
  459. #undef NamedPropertyOverride
  460. #undef PropertyOverride
  461. #undef ObjectProperty
  462. #undef IMEProperty
  463. #undef NoIMEProperty
  464. #undef ObjectPropertyOverride
  465. #undef PropertyWithUsage
  466. #undef NamedPropertyWithUsage
  467. #undef NamedPropertyWithUsageOverride
  468. #undef PropertyWithUsageOverride
  469. #undef ObjectpropertyWithUsage
  470. #undef ObjectpropertyWithUsageOverride
  471. #undef ArrayProperty
  472. #undef NamedArrayProperty
  473. #undef NamedArrayPropertyOverride
  474. #undef ArrayPropertyOverride
  475. #undef ReadOnlyArrayProperty
  476. #undef ReadOnlyArrayPropertyOverride
  477. #undef ReadOnlyProperty
  478. #undef ReadOnlyPropertyWithUsage
  479. #undef ReadOnlyPropertyWithUsageOverride
  480. #undef NamedReadOnlyProperty
  481. #undef NamedReadOnlyPropertyOverride
  482. #undef ReadOnlyPropertyOverride
  483. #undef ReadOnlyObjectProperty
  484. #undef ReadOnlyObjectPropertyOverride
  485. #undef ReadOnlyObjectPropertyWithUsage
  486. #undef ReadOnlyObjectPropertyWithUsageOverride
  487. #undef DesignOnlyProperty
  488. #undef NamedDesignOnlyProperty
  489. #undef DesignOnlyPropertyOverride
  490. #undef DesignOnlyObjectProperty
  491. #undef NamedDesignOnlyObjectProperty
  492. #undef DesignOnlyObjectPropertyOverride
  493. #undef NamedDesignOnlyObjectPropertyOverride
  494. #undef Event
  495. #undef EventArg
  496. #undef EndArgs
  497. #undef NamedEvent
  498. #undef NamedEventArg
  499. #undef NamedEndArgs
  500. #undef NoProperty
  501. #undef NamedNoProperty
  502. #undef SymbolProperty
  503. #undef SymbolPropertyOverride
  504. #undef ReadOnlySymbolProperty
  505. #undef ReadOnlySymbolPropertyOverride
  506.  
  507.