.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TYPE_STRING" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TYPE_STRING \- Creates a type string .SH "SYNOPSIS" .PP \fBC++:\fR .HP 16 \fB\fBTAU_TYPE_STRING\fR\fR\fB(\fR\fBstring\ &\fR\fB\fIvariable\fR\fR\fB, \fR\fBstring\ &\fR\fB\fItype_string\fR\fR\fB);\fR .SH "DESCRIPTION" .PP This macro assigns the string constructed in type_string to the variable. The + operator and the CT macro can be used to construct the type string of an object. This is useful in identifying templates uniquely, as shown below. .SH "EXAMPLE" .PP \fBC++ :\fR .sp .nf template ostream& operator<<(ostream& out, const ParticleBase& P) { TAU_TYPE_STRING(taustr, "ostream (ostream, " + CT(P) + " )"); TAU_PROFILE("operator<<()"taustr, TAU_PARTICLE | TAU_IO); ... } .fi .PP When PLayout is instantiated with " UniformCartesian<3U, double> ",this generates the unique template name: .sp .nf operator<<() ostream const ParticleBase > ) .fi .PP The following example illustrates the usage of the CT macro to extract the name of the class associated with the given object using CT(*this); .sp .nf template unsigned ParticleBase::GetMessage(Message& msg, int node) { TAU_TYPE_STRING(taustr, CT(*this) + "unsigned (Message, int)"); TAU_PROFILE("ParticleBase::GetMessage()", taustr, TAU_PARTICLE); ... } .fi .PP When PLayout is instantiated with " UniformCartesian<3U, double> ",this generates the unique template name: .sp .nf ParticleBase::GetMessage() ParticleBase > unsigned (Message, int) .fi .SH "SEE ALSO" .PP CT(3), TAU_PROFILE, TAU_PROFILE_TIMER(3)