Commit 7dcd6e48 authored by aliahmadbutt4's avatar aliahmadbutt4
Browse files

Removed namespace std

parent b0f751d2
Pipeline #218 failed with stages
in 14 minutes and 13 seconds
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef Instance_hpp_
#define Instance_hpp_
#include <iostream>
......@@ -27,7 +27,6 @@
#include "core/Tuple.hpp"
using namespace std;
using namespace boost::posix_time;
namespace pfabric {
/**
......@@ -151,7 +150,7 @@ public:
* Output member variable information.
* @param os the output stream handle.
*/
void print(ostream& os = cout) {
void print(std::ostream& os = std::cout) {
os << "[ " << this->sequenceInComplex << "," << this->state << " ,";
//this->originalEvent->print(os);
os << " ]\n";
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NFAController_hpp_
#define NFAController_hpp_
......@@ -111,7 +111,7 @@ public:
* @param name the name of the start state
* @return a pointer to start state
*/
typename StartState<TinPtr, ToutPtr, TdepPtr>::StartStatePtr createStartState(string name) {
typename StartState<TinPtr, ToutPtr, TdepPtr>::StartStatePtr createStartState(std::string name) {
start.reset(new StartState<TinPtr, ToutPtr, TdepPtr>(stateCountID++, name));
return start;
}
......@@ -121,7 +121,7 @@ public:
* @param name the name of this normal state
* @return a pointer to a normal state
*/
typename NormalState<TinPtr, ToutPtr, TdepPtr>::NormalStatePtr createNormalState(string name) {
typename NormalState<TinPtr, ToutPtr, TdepPtr>::NormalStatePtr createNormalState(std::string name) {
typename NormalState<TinPtr, ToutPtr, TdepPtr>::NormalStatePtr state(
new NormalState<TinPtr, ToutPtr, TdepPtr>(stateCountID++, name));
normalStates.push_back(state);
......@@ -133,7 +133,7 @@ public:
* @param spec the specification of this state (whether kleene star, kleene plus and so on)
* @return a pointer to a kleene state
*/
typename KleeneState<TinPtr, ToutPtr, TdepPtr>::KleeneStatePtr createKleeneState(string name,
typename KleeneState<TinPtr, ToutPtr, TdepPtr>::KleeneStatePtr createKleeneState(std::string name,
typename KleeneState<TinPtr, ToutPtr, TdepPtr>::KleeneSpecification spec = KleeneState<
TinPtr, ToutPtr, TdepPtr>::Star) {
typename KleeneState<TinPtr, ToutPtr, TdepPtr>::KleeneStatePtr state(
......@@ -146,7 +146,7 @@ public:
* @param name the name of the final state
* @return a pointer to a final state
*/
typename FinalState<TinPtr, ToutPtr, TdepPtr>::FinalStatePtr createFinalState(string name) {
typename FinalState<TinPtr, ToutPtr, TdepPtr>::FinalStatePtr createFinalState(std::string name) {
typename FinalState<TinPtr, ToutPtr, TdepPtr>::FinalStatePtr final(
new FinalState<TinPtr, ToutPtr, TdepPtr>(stateCountID++, name));
finalStates.push_back(final);
......@@ -158,7 +158,7 @@ public:
* @return a pointer to a negated state
*/
typename NegationState<TinPtr, ToutPtr, TdepPtr>::NegationStatePtr createNegationState(
string name) {
std::string name) {
typename NegationState<TinPtr, ToutPtr, TdepPtr>::NegationStatePtr state(
new NegationState<TinPtr, ToutPtr, TdepPtr>(stateCountID++, name));
negatedStates.push_back(state);
......@@ -432,7 +432,7 @@ public:
this->update = update;
}
void print (ostream& out = std::cout) ;
void print (std::ostream& out = std::cout) ;
initDependency init ;
......@@ -553,7 +553,7 @@ void NFAController<TinPtr, ToutPtr, TdepPtr>::addNormalState(typename NormalStat
}
template <class TinPtr, class ToutPtr, class TdepPtr>
void NFAController<TinPtr, ToutPtr, TdepPtr>::print (ostream& out) {
void NFAController<TinPtr, ToutPtr, TdepPtr>::print (std::ostream& out) {
out << this->start->getStateName() << std::endl;
}
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NFAStructure_hpp_
#define NFAStructure_hpp_
......@@ -256,7 +256,7 @@ void NFAStructure<TinPtr, ToutPtr, TdepPtr>::addEvent(const TinPtr& event,
((ForwardEdge<TinPtr, ToutPtr, TdepPtr>*) (currentEdge))->getDestState();
} else if (currentEdge->getEdgeType() == NFAEdge<TinPtr, ToutPtr, TdepPtr>::Loop) {
typename vector<std::pair<KleeneState<TinPtr, ToutPtr, TdepPtr>*, short> >::iterator res = std::find_if(
typename std::vector<std::pair<KleeneState<TinPtr, ToutPtr, TdepPtr>*, short> >::iterator res = std::find_if(
kleeneState.begin(), kleeneState.end(),
compare<TinPtr, ToutPtr, TdepPtr>((KleeneState<TinPtr, ToutPtr, TdepPtr>*) (currentState)));
res->second = res->second + 1;
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef StructurePool_hpp_
#define StructurePool_hpp_
......@@ -66,7 +66,7 @@ public:
* Output the information into ostream object
* @param out The output stream handle.
*/
void print(ostream& out = cout) const {
void print(std::ostream& out = std::cout) const {
/*
os << std::endl;
for (value_id_multimap<
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ForwardEdge_hpp
......@@ -54,7 +54,7 @@ public:
* output member variable information.
* @param out the output stream handle.
*/
virtual void write(ostream& out = cout) const {
virtual void write(std::ostream& out = std::cout) const {
out << "This is a forward edge with ID(" << this->edgeID
<< ") to destination state " << destState->getStateID();
}
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _LoopEdge_hpp
#define _LoopEdge_hpp
......@@ -58,7 +58,7 @@ public:
* output member variable information.
* @param out the output stream handle.
*/
virtual void write(ostream& out = cout) const {
virtual void write(std::ostream& out = std::cout) const {
out << "This is a loop edge with ID(" << this->edgeID << ") with loop number "
<< numOfLoop;
}
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NFAEdge_hpp_
#define NFAEdge_hpp_
......@@ -24,7 +24,6 @@
#include <cassert>
#include <boost/function.hpp>
#include "../Instance.hpp"
using namespace std;
namespace pfabric {
/**
......@@ -79,7 +78,7 @@ public:
* Output member variable information.
* @param out the output stream handle.
*/
virtual void write(ostream& out = cout) const= 0;
virtual void write(std::ostream& out = std::cout) const= 0;
/**
* Get the type of this edge either loop or forward
* @return As above.
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FinalState_hpp_
#define FinalState_hpp_
......@@ -43,7 +43,7 @@ public:
* @param stateID the state id to set
* @param name the name of the state
*/
FinalState(int stateID, string name): NFAState<Tin>(stateID, name) {}
FinalState(int stateID, std::string name): NFAState<Tin>(stateID, name) {}
/**
* Get the type of this state (final).
* @return as above.
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KleeneState_hpp_
#define KleeneState_hpp_
......@@ -51,7 +51,7 @@ public:
* @param forwardEdges forward edges from this state
* @param spec the type of this kleene state
*/
KleeneState(int stateID, string name,
KleeneState(int stateID, std::string name,
std::vector<typename ForwardEdge<Tin, Tout, Tdep>::ForwardEdgePtr> forwardEdges, KleeneSpecification spec = Star) : NormalState<Tin, Tout, Tdep>(stateID, name, forwardEdges) {this->spec = spec; }
/**
* constructor to set the state id and its specification
......@@ -66,7 +66,7 @@ public:
* @param name the name of the state
* @param spec the type of this kleene state
*/
KleeneState(int stateID, string name, KleeneSpecification spec=Star): NormalState<Tin, Tout, Tdep>(stateID, name) {
KleeneState(int stateID, std::string name, KleeneSpecification spec=Star): NormalState<Tin, Tout, Tdep>(stateID, name) {
this->spec = spec;
}
/**
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PipeFabric is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PipeFabric. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NFAState_hpp
#define NFAState_hpp
#include <iostream>
#include <boost/shared_ptr.hpp>
using namespace std;
namespace pfabric {
/**
* @brief A NFA state object represents an automaton state in our engine. This state can
......@@ -68,7 +68,7 @@ public:
* Output member variable information
* @param out The output stream handle.
*/
virtual void write(std::ostream& out = cout) const {
virtual void write(std::ostream& out = std::cout) const {
out << "Name of this state: " << stateName << std::endl;
out << " and id = " << stateID << std::endl;
}
......@@ -97,7 +97,7 @@ public:
* Set the state name as string
* @param stateName the name of this state ro be shown
*/
void setStateName(string stateName) { this->stateName = stateName; }
void setStateName(std::string stateName) { this->stateName = stateName; }
/**
* Equality comparison operator.
......
......@@ -43,14 +43,14 @@ public:
* @param name the name of the state
*
*/
NegationState(int stateID, string name): NormalState<Tin, Tout, Tdep>(stateID, name){}
NegationState(int stateID, std::string name): NormalState<Tin, Tout, Tdep>(stateID, name){}
/**
* constructor to set the state id, name and forward edges for this state
* @param stateID the state id to set
* @param name the name of the state
* @param forward_edges forward edges from this state
*/
NegationState(int stateID, string name,
NegationState(int stateID, std::string name,
std::vector<typename ForwardEdge<Tin, Tout, Tdep>::ForwardEdgePtr> forwardEdges) : NormalState<Tin, Tout, Tdep>(stateID, name, forwardEdges) {}
/**
* @get the type of this state (initial state).
......
/*
* Copyright (C) 2014-2019 DBIS Group - TU Ilmenau, All Rights Reserved.
*
* This file is part of the PipeFabric package.
*
* PipeFabric is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by