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