Changeset 535

Show
Ignore:
Timestamp:
08/16/09 18:13:28 (15 years ago)
Author:
smidl
Message:

Changed UIREGISTER for templated classes to UIREGISTER2.

* it is now consistent with SHAREDPTR2
* it works even when two UIREGISTERS are on the same line in defferent files

Location:
library/bdm
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/user_info.h

    r534 r535  
    551551} 
    552552 
    553 #define CONCATENATE0( name, line ) name##line 
    554 #define CONCATENATE( name, line ) CONCATENATE0( name, line ) 
    555  
    556553/*! 
    557554  \def UIREGISTER(class_name) 
     
    564561*/ 
    565562#ifndef BDMLIB 
    566 #define UIREGISTER(class_name) static bdm::ParticularUI<class_name> CONCATENATE(registrator, __LINE__)(#class_name) 
     563#define UIREGISTER(class_name) static bdm::ParticularUI<class_name> UI##class_name(#class_name) 
    567564#else 
    568565#define UIREGISTER(class_name) 
    569566#endif 
    570567 
     568//! Instrumental macro for UIREGISTER2 
     569#define QUOTEME(x) #x 
     570 
     571/*! 
     572  \def UIREGISTER2(class_name,template_name) 
     573  \brief Variant of UIREGISTER for templated classes 
     574 
     575  Technical meann of registering UIREGISTER(class_name<template_name>). 
     576 
     577  \ref ui_page 
     578 */ 
     579#ifndef BDMLIB 
     580#define UIREGISTER2(class_name, temp_name) static bdm::ParticularUI<class_name<temp_name> > UI##class_name##_##temp_name( QUOTEME(class_name<temp_name>) ) 
     581#else 
     582#define UIREGISTER2(class_name,temp_name)  
     583#endif 
     584 
    571585#endif // #ifndef USER_INFO_H 
  • library/bdm/stat/exp_family.h

    r529 r535  
    164164 
    165165}; 
    166 UIREGISTER (enorm<chmat>); 
     166UIREGISTER2 (enorm, chmat); 
    167167SHAREDPTR2 ( enorm, chmat ); 
    168 UIREGISTER (enorm<ldmat>); 
     168UIREGISTER2 (enorm, ldmat); 
    169169SHAREDPTR2 ( enorm, ldmat ); 
    170 UIREGISTER (enorm<fsqmat>); 
     170UIREGISTER2 (enorm, fsqmat); 
    171171SHAREDPTR2 ( enorm, fsqmat ); 
    172172 
     
    571571                }; 
    572572}; 
    573 UIREGISTER (mlnorm<ldmat>); 
     573UIREGISTER2 (mlnorm,ldmat); 
    574574SHAREDPTR2 ( mlnorm, ldmat ); 
    575 UIREGISTER (mlnorm<fsqmat>); 
     575UIREGISTER2 (mlnorm,fsqmat); 
    576576SHAREDPTR2 ( mlnorm, fsqmat ); 
    577 UIREGISTER (mlnorm<chmat>); 
     577UIREGISTER2 (mlnorm, chmat); 
    578578SHAREDPTR2 ( mlnorm, chmat ); 
    579579 
     
    635635}; 
    636636 
    637 UIREGISTER (mgnorm<chmat>); 
     637UIREGISTER2 (mgnorm, chmat); 
    638638SHAREDPTR2 ( mgnorm, chmat ); 
    639639