Fixing Coding Style
diff --git a/src/utility/nlsr_logger.cpp b/src/utility/nlsr_logger.cpp
index 82b6e75..f214c6a 100644
--- a/src/utility/nlsr_logger.cpp
+++ b/src/utility/nlsr_logger.cpp
@@ -49,7 +49,7 @@
keywords::min_free_space = 64 * 1024 * 1024
));
sink->set_formatter(
- expr::format("%1%: %2%")
+ expr::format("%1% %2%")
% getEpochTime()
% expr::smessage
);
diff --git a/src/utility/nlsr_tokenizer.cpp b/src/utility/nlsr_tokenizer.cpp
index 35d6625..a1ed2bd 100644
--- a/src/utility/nlsr_tokenizer.cpp
+++ b/src/utility/nlsr_tokenizer.cpp
@@ -15,8 +15,8 @@
void
nlsrTokenizer::makeToken()
{
- char_separator<char> sep(seps.c_str());
- tokenizer< char_separator<char> >tokens(originalString, sep);
+ char_separator<char> sep(m_seps.c_str());
+ tokenizer< char_separator<char> >tokens(m_originalString, sep);
tokenizer< char_separator<char> >::iterator tok_iter = tokens.begin();
for ( ; tok_iter != tokens.end(); ++tok_iter)
{
@@ -27,15 +27,15 @@
insertToken(oneToken);
}
}
- firstToken=vTokenList[0];
+ m_firstToken=m_vTokenList[0];
makeRestOfTheLine();
}
void
nlsrTokenizer::insertToken(const string& token)
{
- tokenList.push_back(token);
- vTokenList.push_back(token);
+ m_tokenList.push_back(token);
+ m_vTokenList.push_back(token);
}
int
@@ -43,8 +43,8 @@
{
int pos=-1;
int i=0;
- for(std::list<string>::iterator it=tokenList.begin();
- it!=tokenList.end(); it++)
+ for(std::list<string>::iterator it=m_tokenList.begin();
+ it!=m_tokenList.end(); it++)
{
if( (*it) == token )
{
@@ -52,7 +52,7 @@
}
i++;
}
- if( i < tokenList.size() )
+ if( i < m_tokenList.size() )
{
pos=i;
}
@@ -63,13 +63,13 @@
nlsrTokenizer::getTokenString(int from , int to)
{
string returnString="";
- if((from>=0 && to<tokenList.size()) &&
- (to>=from && to <tokenList.size()))
+ if((from>=0 && to<m_tokenList.size()) &&
+ (to>=from && to <m_tokenList.size()))
{
for(int i=from; i<=to; i++)
{
- returnString+=seps;
- returnString+=vTokenList[i];
+ returnString+=m_seps;
+ returnString+=m_vTokenList[i];
}
}
trim(returnString);
@@ -79,7 +79,7 @@
string
nlsrTokenizer::getTokenString(int from)
{
- return getTokenString(from,tokenList.size()-1);
+ return getTokenString(from,m_tokenList.size()-1);
}
static bool
@@ -91,16 +91,16 @@
void
nlsrTokenizer::makeRestOfTheLine()
{
- restOfTheLine=getTokenString(1);
+ m_restOfTheLine=getTokenString(1);
}
bool
nlsrTokenizer::doesTokenExist(string token)
{
- std::list<string >::iterator it = std::find_if( tokenList.begin(),
- tokenList.end(),
+ std::list<string >::iterator it = std::find_if( m_tokenList.begin(),
+ m_tokenList.end(),
bind(&tokenCompare, _1 , token));
- if( it != tokenList.end() )
+ if( it != m_tokenList.end() )
{
return true;
}
diff --git a/src/utility/nlsr_tokenizer.hpp b/src/utility/nlsr_tokenizer.hpp
index 4b84d8b..02d6eea 100644
--- a/src/utility/nlsr_tokenizer.hpp
+++ b/src/utility/nlsr_tokenizer.hpp
@@ -19,62 +19,62 @@
{
public:
nlsrTokenizer(const string& inputString)
- : firstToken()
- , restOfTheLine()
- , currentPosition(0)
+ : m_firstToken()
+ , m_restOfTheLine()
+ , m_currentPosition(0)
{
- seps = " ";
- originalString = inputString;
+ m_seps = " ";
+ m_originalString = inputString;
makeToken();
}
nlsrTokenizer(const string& inputString, const string& separator)
- : firstToken()
- , restOfTheLine()
- , currentPosition(0)
+ : m_firstToken()
+ , m_restOfTheLine()
+ , m_currentPosition(0)
{
- seps = separator;
- originalString = inputString;
+ m_seps = separator;
+ m_originalString = inputString;
makeToken();
}
string getFirstToken()
{
- return firstToken;
+ return m_firstToken;
}
string getRestOfLine()
{
- return restOfTheLine;
+ return m_restOfTheLine;
}
void resetCurrentPosition(uint32_t cp=0)
{
- if( cp >=0 && cp <= vTokenList.size() )
+ if( cp >=0 && cp <= m_vTokenList.size() )
{
- currentPosition=cp;
+ m_currentPosition=cp;
}
}
string getNextToken()
{
- if(currentPosition >= 0 && currentPosition <= (vTokenList.size()-1))
+ if(m_currentPosition >= 0 && m_currentPosition <= (m_vTokenList.size()-1))
{
- return vTokenList[currentPosition++];
+ return m_vTokenList[m_currentPosition++];
}
return "";
}
uint32_t getTokenNumber()
{
- return tokenList.size();
+ return m_tokenList.size();
}
string getToken(int position)
{
- if( position >=0 && position <vTokenList.size() )
+ if( position >=0 && position <m_vTokenList.size() )
{
- return vTokenList[position];
+ return m_vTokenList[position];
}
return "";
}
@@ -91,13 +91,13 @@
void insertToken(const string& token);
void makeRestOfTheLine();
- string seps;
- string originalString;
- string firstToken;
- string restOfTheLine;
- std::list<string> tokenList;
- std::vector<string> vTokenList;
- uint32_t currentPosition;
+ string m_seps;
+ string m_originalString;
+ string m_firstToken;
+ string m_restOfTheLine;
+ std::list<string> m_tokenList;
+ std::vector<string> m_vTokenList;
+ uint32_t m_currentPosition;
};
}//namespace nlsr