";
bool lightMode = (nameColumn == ~0) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName));
for ( uint32 c=0; c!=NC; ++c )
{
s += "";
if ( c == keyColumn )
s += key; // key should be a substr of toString( c )
else
{
if ( lightMode )
s += "\"";
else
s += columnToString( c );
}
s += " | ";
}
s += "
\n";
return s;
}
///
std::string toCSVLine( char columnSeparator=',', string internalSeparator=" - ", uint32 keyColumn=~0, const string& key=string(), const string& previousKey=string(),
uint32 nameColumn=~0, const string& previousName=string() ) const
{
std::string s;
bool lightMode = (nameColumn == ~0) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName));
for ( uint32 c=0; c!=NC; ++c )
{
if ( c == keyColumn )
s += key; // key should be a substr of columnToString( c )
else
{
if ( lightMode )
s += "\"";
else
s += columnToString( c, internalSeparator );
}
s += columnSeparator;
}
s += "\n";
return s;
}
///
std::string columnToString( uint32 column, const std::string& internalSeparator=", " ) const
{
std::string s;
std::vector