The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

irc::stringjoiner Class Reference

irc::stringjoiner joins string lists into a string, using the given seperator string. More...

#include <hashcomp.h>

Inheritance diagram for irc::stringjoiner:

Inheritance graph
[legend]
Collaboration diagram for irc::stringjoiner:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 stringjoiner (const std::string &seperator, const std::vector< std::string > &sequence, int begin, int end)
 Join elements of a vector, between (and including) begin and end.
 stringjoiner (const std::string &seperator, const std::deque< std::string > &sequence, int begin, int end)
 Join elements of a deque, between (and including) begin and end.
 stringjoiner (const std::string &seperator, const char *const *sequence, int begin, int end)
 Join elements of an array of char arrays, between (and including) begin and end.
std::stringGetJoined ()
 Get the joined sequence.

Private Attributes

std::string joined
 Output string.

Detailed Description

irc::stringjoiner joins string lists into a string, using the given seperator string.

This class can join a vector of std::string, a deque of std::string, or a const char* const* array, using overloaded constructors.

Definition at line 156 of file hashcomp.h.


Constructor & Destructor Documentation

irc::stringjoiner::stringjoiner const std::string seperator,
const std::vector< std::string > &  sequence,
int  begin,
int  end
 

Join elements of a vector, between (and including) begin and end.

Parameters:
seperator The string to seperate values with
sequence One or more items to seperate
begin The starting element in the sequence to be joined
end The ending element in the sequence to be joined

Definition at line 383 of file hashcomp.cpp.

References joined.

irc::stringjoiner::stringjoiner const std::string seperator,
const std::deque< std::string > &  sequence,
int  begin,
int  end
 

Join elements of a deque, between (and including) begin and end.

Parameters:
seperator The string to seperate values with
sequence One or more items to seperate
begin The starting element in the sequence to be joined
end The ending element in the sequence to be joined

Definition at line 393 of file hashcomp.cpp.

References joined.

irc::stringjoiner::stringjoiner const std::string seperator,
const char *const *  sequence,
int  begin,
int  end
 

Join elements of an array of char arrays, between (and including) begin and end.

Parameters:
seperator The string to seperate values with
sequence One or more items to seperate
begin The starting element in the sequence to be joined
end The ending element in the sequence to be joined

Definition at line 403 of file hashcomp.cpp.

References joined.


Member Function Documentation

std::string & irc::stringjoiner::GetJoined  ) 
 

Get the joined sequence.

Returns:
A reference to the joined string

Definition at line 413 of file hashcomp.cpp.

References joined.

Referenced by ListModeBase::DoSyncChannel(), and RemoveBase::Handle().


Member Data Documentation

std::string irc::stringjoiner::joined [private]
 

Output string.

Definition at line 162 of file hashcomp.h.

Referenced by GetJoined(), and stringjoiner().


The documentation for this class was generated from the following files: