"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "projects/MatrixTesting/src/matrixTools.h" between
rose-0.11.53.0.tar.gz and rose-0.11.54.0.tar.gz

About: ROSE is a compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C, C++, UPC, Fortran, OpenMP, Java, Python and PHP applications.

matrixTools.h  (rose-0.11.53.0):matrixTools.h  (rose-0.11.54.0)
#ifndef matrixTools_H #ifndef matrixTools_H
#define matrixTools_H #define matrixTools_H
#include <Rose/BitFlags.h>
#include <Rose/FormattedTable.h>
#include <Sawyer/CommandLine.h> #include <Sawyer/CommandLine.h>
#include <Sawyer/Database.h> #include <Sawyer/Database.h>
#include <Sawyer/Message.h>
#include <set> #include <set>
#include <time.h> #include <time.h>
#include <string> #include <string>
enum class Format { enum class Format {
PLAIN, PLAIN = 0x00000001,
YAML YAML = 0x00000002,
HTML = 0x00000004,
CSV = 0x00000008,
SHELL = 0x00000010
}; };
struct Dependency { using FormatFlags = Rose::BitFlags<Format>;
std::string name;
std::string value; // Information about dependencies, such as "tup 0.7.8 is enabled only on ubuntu-
std::string comment; 20.04 when the buid type is tup"
bool enabled = false; class Dependency {
bool supported = false; public:
std::set<std::string> osNames; // The right hand side of dependency constraints.
struct ConstraintRhs {
std::string comparison; // type of comparison to
perform
std::string value; // value to compare agai
nst
ConstraintRhs() {}
ConstraintRhs(const std::string &comparison, const std::string &value)
: comparison(comparison), value(value) {}
bool operator==(const ConstraintRhs &other) const {
return comparison == other.comparison && value == other.value;
}
};
// The LHS is a dependency name such as "build" and the value is an vecotr o
f comparisons between build's value and a
// provided RHS value.
using Constraints = Sawyer::Container::Map<std::string /*lhs*/, std::vector<
ConstraintRhs>>;
public:
std::string name; // "tup"
std::string value; // "0.7.8"
std::string comment; // "Has some problems o
n RedHat"
bool enabled = false; // true: this dependenc
y should be tested
bool supported = false; // false: not officiall
y supported by ROSE
std::set<std::string> osNames; // "ubuntu:2004 ubuntu:
1804"
Constraints constraints; // build=tup, languages
=binaries
}; };
// Dependencies in some order
using DependencyList = std::vector<Dependency>; using DependencyList = std::vector<Dependency>;
// The list of dependency columns that must be returned when calling loadDepende
ncies
std::string dependencyColumns();
// Load dependency info from database. The statement must select the columns ret
urned by dependencyColumns starting at index 0,
// but but it may return additional columns if necessary.
DependencyList loadDependencies(Sawyer::Database::Statement);
// Update a dependency. The name and value must already exist.
void updateDependency(Sawyer::Database::Connection, const Dependency&);
// Insert the --database / -D switch into the switch group so that the result is stored in 'uri' // Insert the --database / -D switch into the switch group so that the result is stored in 'uri'
void insertDatabaseSwitch(Sawyer::CommandLine::SwitchGroup&, std::string &uri); void insertDatabaseSwitch(Sawyer::CommandLine::SwitchGroup&, std::string &uri);
// Insert the --format / -F switch. // Insert the --format / -F switch.
void insertOutputFormatSwitch(Sawyer::CommandLine::SwitchGroup&, Format&); void insertOutputFormatSwitch(Sawyer::CommandLine::SwitchGroup&, Format&, Format Flags);
// Convert Unix epoch time to human readable time in the local timezone. // Convert Unix epoch time to human readable time in the local timezone.
std::string timeToLocal(time_t); std::string timeToLocal(time_t);
// Convert Unix epoch time to human readable time in the GMT timezone.
std::string timeToGmt(time_t);
// if the version is a SHA1, then return an abbreviated version. // if the version is a SHA1, then return an abbreviated version.
std::string abbreviatedVersion(const std::string&); std::string abbreviatedVersion(const std::string&);
// Given a point in time, return a string like "about 5 days ago". This also wor ks for future time points ("about 5 days in the // Given a point in time, return a string like "about 5 days ago". This also wor ks for future time points ("about 5 days in the
// future"). // future").
std::string approximateAge(time_t point); std::string approximateAge(time_t point);
// The list of dependency columns that must be returned when calling loadDepende // Convert an output format to a table format.
ncies Rose::FormattedTable::Format tableFormat(Format);
std::string dependencyColumns();
// Load dependency info from database. // Split a string into words at the whitespace, trimming all whitespace from eac
DependencyList loadDependencies(Sawyer::Database::Statement); h word and not returning any empty words.
std::vector<std::string> splitIntoWords(const std::string&);
// Open a connection to a database, or fail with some info about how to specify
a database name
Sawyer::Database::Connection connectToDatabase(const std::string &uri, Sawyer::M
essage::Facility&);
#endif #endif
 End of changes. 10 change blocks. 
15 lines changed or deleted 76 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)