[vtkusers] Set/Get Macros and doxygen

John Biddiscombe john.biddiscombe at mirada-solutions.com
Thu May 29 07:01:28 EDT 2003


\VTK\Utilities\Doxygen\doxyfile.in

see 

PREDEFINED  = "vtkSetMacro(name,type)= \
                 virtual void Set##name (type);" \
              "vtkGetMacro(name,type)= \
                 virtual type Get##name ();" \
              "vtkSetStringMacro(name)= \
                 virtual void Set##name (const char*);" \
              "vtkGetStringMacro(name)= \
                 virtual char* Get##name ();" \
              "vtkSetClampMacro(name,type,min,max)= \
                 virtual void Set##name (type);" \
              "vtkSetObjectMacro(name,type)= \
                 virtual void Set##name (type*);" \
              "vtkGetObjectMacro(name,type)= \
                 virtual type *Get##name ();" \
              "vtkBooleanMacro(name,type)= \
                 virtual void name##On (); \
                 virtual void name##Off ();" \
              "vtkSetVector2Macro(name,type)= \
                 virtual void Set##name (type, type); \
                 void Set##name (type [2]);" \
              "vtkGetVector2Macro(name,type)= \
                 virtual type *Get##name (); \
                 virtual void Get##name (type &, type &); \
                 virtual void Get##name (type [2]);" \
              "vtkSetVector3Macro(name,type)= \
                 virtual void Set##name (type, type, type); \
                 virtual void Set##name (type [3]);" \
              "vtkGetVector3Macro(name,type)= \
                 virtual type *Get##name (); \
                 virtual void Get##name (type &, type &, type &); \
                 virtual void Get##name (type [3]);" \
              "vtkSetVector4Macro(name,type)= \
                 virtual void Set##name (type, type, type, type); \
                 virtual void Set##name (type [4]);" \
              "vtkGetVector4Macro(name,type)= \
                 virtual type *Get##name (); \
                 virtual void Get##name (type &, type &, type &, type &); \
                 virtual void Get##name (type [4]);" \
               "vtkSetVector6Macro(name,type)= \
                 virtual void Set##name (type, type, type, type, \
                                         type, type); \
                 virtual void Set##name (type [6]);" \
               "vtkGetVector6Macro(name,type)= \
                  virtual type *Get##name (); \
                  virtual void Get##name (type &, type &, type &, \
                                          type &, type &, type &); \
                  virtual void Get##name (type [6]);" \
               "vtkSetVectorMacro(name,type,count)= \
                  virtual void Set##name(type data[]);" \
               "vtkGetVectorMacro(name,type,count)= \
                   virtual type *Get##name (); \
                   virtual void Get##name(type data[##count]);" \
               "vtkWorldCoordinateMacro(name)= \
                   virtual vtkCoordinate *Get##name##Coordinate (); \
                   virtual void Set##name(float x[3]); \
                   virtual void Set##name(float x, float y, float z); \
                   virtual float *Get##name();" \
               "vtkViewportCoordinateMacro(name)= \
                   virtual vtkCoordinate *Get##name##Coordinate (); \
                   virtual void Set##name(float x[2]); \
                   virtual void Set##name(float x, float y); \
                   virtual float *Get##name();" \
               "vtkTypeMacro(thisClass,superclass)= \
                   typedef superclass Superclass; \
                   virtual const char *GetClassName(); \
                   static int IsTypeOf(const char *type); \
                   virtual int IsA(const char *type); \
                   static thisClass* SafeDownCast(vtkObject *o);" \
               "vtkTypeRevisionMacro(thisClass,superclass)= \
                   typedef superclass Superclass; \
                   virtual const char *GetClassName(); \
                   static int IsTypeOf(const char *type); \
                   virtual int IsA(const char *type); \
                   static thisClass* SafeDownCast(vtkObject *o);"



> -----Original Message-----
> From: Bruce.Lamond at ed.ac.uk [mailto:Bruce.Lamond at ed.ac.uk]
> Sent: 29 May 2003 11:52
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] Set/Get Macros and doxygen
> 
> 
> Hi there,
> 
> In the vtk source files, special set/get macros are used 
> which get expanded
> into accessor methods when doxygen generates the 
> documentation. I'm wondering
> how to configure the doxygen Doxyfile config file to achieve 
> this behaviour.
>  
> eg in vtkNewClass.h:
> ---------------------------------------
> class vtkNewClass {
> public:
>   vtkSetMacro(FileName, int);
> };
> ------------------------------------------- 
> in the documentation this has expanded to :
> -----------------------------------------
> Public Methods:
>  
> SetFileName(int)
> ---------------------------------------------- 
> Anyone got any ideas how this is done?
> 
> cheers,
> 
> Bruce
> 
> 
>              ################################################
>              # Bruce Lamond                                 #
>              # Edinburgh Virtual Environment Centre (EdVEC) #
>              # University of Edinburgh                      #
>              # JCMB room 2403                               #
>              # The Kings Buildings                          #
>              # West Mains Road                              #
>              # Edinburgh EH9 3JZ                            # 
>              # UK                                           #
>              # www.edvec.ed.ac.uk                           #
>              # Tel. (00 44 )/(0) 131 650 4981               #
>              ################################################
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 



More information about the vtkusers mailing list