[Insight-developers] difference between cxx and txx extensions

kent williams norman-k-williams at uiowa.edu
Tue Aug 12 16:08:17 EDT 2008


By convention, a Œ.cxx¹ file is a C++ source file. A Œ.txx¹ file contains
templated  C++ class methods.

In the particular case of ITK, all templated classes are defined in two
files ‹ a header file (.h) and a source file containing the implementation
of the member functions for that particular template class.  The .txx file
is #include-ed in the header file, unless explicit instantiation is switched
on.  In the case 

A template class need not have a .txx if all methods are implemented in the
header.  A non-template class will comprise a .h and .cxx file.

On 8/12/08 2:11 PM, "Hua-Mei Chen" <huameichen0523 at gmail.com> wrote:

> Hi,
>  
>    I am new to this list and sorry if this has asked been asked before. But,
> what is the difference between a .cxx file and a .txx file?
>  
> Chen
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20080812/77bcb2c3/attachment.htm>


More information about the Insight-developers mailing list