diff --git a/alib2measurepp/makefile b/alib2measurepp/makefile index 38bca86b66f086f610da9ff2985a30493671b4ef..bf9f76e92604e1768a0c1f7bea9ac9cc0f568d5f 100644 --- a/alib2measurepp/makefile +++ b/alib2measurepp/makefile @@ -10,6 +10,8 @@ endef export NEW_LINE +CXX_FLAGS := -Wall -pedantic -Wextra -Werror -Wshadow -Wpointer-arith -Wcast-qual -Wdelete-non-virtual-dtor -Wredundant-decls + space := $(eval) $(eval) LDFLAGS_DEBUG:=-rdynamic -shared @@ -54,7 +56,7 @@ FORCE: $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -pipe -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC \$$(addprefix -I, \$$(realpath $(INCLUDE_PATHS))) -I\$$(realpath \$$(SOURCES_BASE_DIR)/../src/)$${NEW_LINE}\ + CXXFLAGS:= -pipe -std=c++11 \$$(CXX_OTHER_FLAGS) -c $(CXX_FLAGS) -fPIC \$$(addprefix -I, \$$(realpath $(INCLUDE_PATHS))) -I\$$(realpath \$$(SOURCES_BASE_DIR)/../src/)$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find \$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst \$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, \$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp b/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp index c548fc925b5ce4d4213adff1dfbb9b198b80ba67..507ce46b16ff8c790a30033d9de9dbaad759988d 100644 --- a/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp +++ b/alib2measurepp/src/provisioner/MeasurementProvisioner.cpp @@ -31,7 +31,7 @@ MeasurementProvisionerResults MeasurementProvisioner::runConfiguration ( const M MPRInputResult mprir; for ( const auto & mpsmPair : substitutionMap ) - mprir.inputs.push_back ( { mpsmPair.first, mpiData.getMPIDHandle ( mpsmPair.second ).alias } ); + mprir.inputs.push_back ( { mpsmPair.first, mpiData.getMPIDHandle ( mpsmPair.second ).m_alias } ); if ( inputCounter != 1 ) std::clog << std::endl << std::endl; @@ -40,7 +40,7 @@ MeasurementProvisionerResults MeasurementProvisioner::runConfiguration ( const M std::clog << "| Input [" << inputCounter++ << "/" << inputCount << "]: " << std::endl; for ( const auto & mpsmPair : substitutionMap ) - std::clog << "| \t$" << mpsmPair.first << " -> " << mpiData.getMPIDHandle ( mpsmPair.second ).alias << std::endl; + std::clog << "| \t$" << mpsmPair.first << " -> " << mpiData.getMPIDHandle ( mpsmPair.second ).m_alias << std::endl; std::clog << "| Pipelines:" << std::endl; diff --git a/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.cpp b/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.cpp index 9b890995fbe5a45b6220cf48f15256e9dac212a1..08c4452b703937026cf9919d3c7bc8698edc5143 100644 --- a/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.cpp +++ b/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.cpp @@ -10,12 +10,12 @@ namespace measurements { -MPInputDatum::MPInputDatum ( MPInputDatum::Type type, std::string filename, std::string alias ) : type ( type ), filename ( std::move ( filename ) ), alias ( std::move ( alias ) ) { +MPInputDatum::MPInputDatum ( MPInputDatum::Type type, std::string filename, std::string alias ) : m_type ( type ), m_filename ( std::move ( filename ) ), m_alias ( std::move ( alias ) ) { } MPInputDatum::~MPInputDatum ( ) { - if ( type == MPInputDatum::Type::GENERATOR ) - unlink ( filename.c_str ( ) ); + if ( m_type == MPInputDatum::Type::GENERATOR ) + unlink ( m_filename.c_str ( ) ); } /*---------------------------------------------------------------------------------------------------------------*/ @@ -101,28 +101,28 @@ bool MPSubstitution::containsSubstitution ( const std::string & str ) { /*---------------------------------------------------------------------------------------------------------------*/ -MPPipelineCommand::MPPipelineCommand ( std::string str, std::string alias, bool measure ) : MPSubstitution ( str ), rawCommand ( std::move ( str ) ), alias ( std::move ( alias ) ), measure ( measure ) { +MPPipelineCommand::MPPipelineCommand ( std::string str, std::string alias, bool measure ) : MPSubstitution ( str ), m_rawCommand ( std::move ( str ) ), m_alias ( std::move ( alias ) ), m_measure ( measure ) { } std::string MPPipelineCommand::substitute ( const MPSubstitutionMap & substitutionMap ) const { std::string res = MPSubstitution::substitute ( substitutionMap ); - if ( measure ) + if ( m_measure ) res += " -m"; return res; } const std::string & MPPipelineCommand::getRawCommand ( ) const { - return rawCommand; + return m_rawCommand; } const std::string & MPPipelineCommand::getAlias ( ) const { - return alias; + return m_alias; } bool MPPipelineCommand::getMeasure ( ) const { - return measure; + return m_measure; } /*---------------------------------------------------------------------------------------------------------------*/ @@ -193,7 +193,7 @@ void MPInputData::insertMPInputDatum ( MPInputDatum::Type type, std::string file return; MPInputDatum mpid ( type, std::move ( filename ), std::move ( alias ) ); - this->mpidHandles.emplace ( mpid.filename, std::move ( mpid ) ); + this->mpidHandles.emplace ( mpid.m_filename, std::move ( mpid ) ); } void MPInputData::processSimpleBatchFileData ( const MPCInputDatum & inputDatum, std::list < std::string > & mpidList ) { diff --git a/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.hpp b/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.hpp index a7928fd74052b1c4493db204e5733d07a0a0a20e..6742a4e71911a1f4fd3bb98079a9c94722b39e7b 100644 --- a/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.hpp +++ b/alib2measurepp/src/provisioner/MeasurementProvisionerInputData.hpp @@ -19,9 +19,9 @@ struct MPInputDatum { FILE, GENERATOR }; - Type type; - std::string filename; - std::string alias; + Type m_type; + std::string m_filename; + std::string m_alias; MPInputDatum ( const MPInputDatum & ) = delete; MPInputDatum & operator =( const MPInputDatum & ) = delete; @@ -55,9 +55,9 @@ public: }; class MPPipelineCommand : public MPSubstitution { - std::string rawCommand; - std::string alias; - bool measure; + std::string m_rawCommand; + std::string m_alias; + bool m_measure; public: MPPipelineCommand ( std::string, std::string, bool );