28 #ifndef CASA_TEMPLATE_H
29 #define CASA_TEMPLATE_H
41 template <
class T>
class Vector;
271 #ifndef CASACORE_NO_AUTO_TEMPLATES
272 #include <casacore/casa/Utilities/Template.tcc>
273 #endif //# CASACORE_NO_AUTO_TEMPLATES
static const String reposName
Name of repository files.
A 1-D Specialization of the Array class.
void read(const Vector< String > &files)
Read the templates file or files into the class.
static const Regex namespaceRE
Block< String > allstring_p
Data split all text.
std::vector< double > Vector
static const Regex auxtemplRE
static const uInt Nnmin
Make canonical numbers of 4 digits minimum.
void reset()
Clear the object for a re-use.
static const Regex REPnmax[Nnmax]
static const Regex sretRE1
static const Regex fileRE
static const Regex forwardprelude
static const String REPcanon2[Ncanon2]
void canonical(const Bool tmplonly=False)
Canonicalise the template entries in the object.
const uInt & getTDline(uInt n)
static const Regex leadsp
Data to remove spaces at begin, end, make single, count/remove const.
static const Regex funcnameprelude
Block< String > tdname_p
List of comparison names.
static const Regex mylistprelude
static const Regex contRE
static const Regex PATcanon21[Ncanon2]
static const Regex endifRE
Bool isSplit_p
Indicate data split.
uInt getCount() const
Get the number of template entries.
Block< uInt > tdline_p
Line number in file at which template found.
const String & getTDFlist(uInt n)
Get the various template definition information fields.
static const Regex splitnam
Canonicalise, format and other actions on Casacore template definitions.
Template & operator=(const Template &other)
Assignment (not implemented)
void writeDup(ostream &os, const String &userFile, Bool isSys=False)
Write the duplicate list; the userFile gets ***; isSys gives the system switch.
const String & getTDname(uInt n)
static const Regex functionprelude
static const Regex PATtypedef1[Ntypedef]
static const Regex sconstRE
uInt dcount_p
Count the duplicates.
static const String REPnmin[Nnmin]
uInt ccount_p
And count the comment lines.
Block< uInt > nval_p
Data split numeric number.
static const Regex PATcanon[Ncanon]
static const Regex snamespaceRE
static const uInt Ninif
Replacement patterns for ifs in saved line.
static const Regex PATcanon20[Ncanon2]
static const Regex templateRE
static const Regex spaces
Patterns to analyse an input line.
static const String REPcanon[Ncanon]
static const Regex sretRE4
void setComment(const String &txt, const Bool atstart=False)
Save comment.
static const Regex PATnmin[Nnmin]
Template()
Default constructor.
Block< String > nstring_p
Data split of number string (or empty/spaces)
Regular expression class.
Block< String > namstring_p
Data split name string (first include file)
static const Regex elseRE
static const Regex sauxtemplRE
static const Regex sifRE
Patterns to check the template line.
static const uInt Nnmax
Make canonical numbers of 4 digits maximum.
static const String nullsp
Block< String > output_p
Each element is a template entry on a single line.
const uInt & getTDfile(uInt n)
static String REPtypedef[Ntypedef]
void splitName()
Split the entries in number, name id, rest.
bool Bool
Define the standard types used by Casacore.
static const Regex PATnmax[Nnmax]
void writeOut(ostream &os, const Bool warn=False)
Write the data formatted to the specified file.
static const String singlesp
Block< String > tdflist_p
List of files used.
static const Regex sretRE3
static const Regex stemRE
static const Regex splitnum
Patterns to split off number and name Patterns to split off number and name.
uInt getTDCount() const
Get the number of template definition lines found.
uInt tdcount_p
Number of template definitions extracted from input.
static const String PATinif[Ninif]
static const String REPinif[Ninif]
const String & getTDlist(uInt n)
uInt getDCount()
Get the number of duplicates found.
static const Regex constsp
static const Regex PATtypedef0[Ntypedef]
void sortName(const Bool renumber=False)
Sort the data on name and number and fill in missing number.
String: the storage and methods of handling collections of characters.
static const Regex classprelude
Tests for finding real templates for duplicate tests.
Block< uInt > tdfile_p
Pointers to in which file in list.
Block< String > tdlist_p
List of template definitions.
static const Regex comment
static const Regex typedefRE
uInt count_p
Count the lines.
uInt tcount_p
Count the templates.
static const uInt Ntypedef
Patterns to make all typedefs comparisons for duplicates possible Note that the first three should be...
static const uInt Ncanon
Simple pattern and replacements to make canonical templates files.
Block< Int > comptr_p
And where they originated.
static const uInt Ncanon2
For canonical change: replacement of pattern with pattern.
const String & operator[](uInt n)
Operators.
void setOutput(const String &txt)
Save a line.
static const Regex sretRE2
Block< String > comout_p
Record comment lines.
static const Regex stypedefRE
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
uInt getTCount() const
Get the number of templates found after all processing.