X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fhashcomp.h;h=1f1e541d3aeabf3aac8d6a916bf747cfa7f9ebcd;hb=f3d134a5b642b83e865c03b45c313df7f829ba15;hp=94c222e14f0b6f59766108f8098a83fb0e6ff6f8;hpb=780757cbc172daa4d9973e8e3b87fd42cfac5541;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/hashcomp.h b/include/hashcomp.h index 94c222e14..1f1e541d3 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -185,28 +185,12 @@ namespace irc * @param begin The starting element in the sequence to be joined * @param end The ending element in the sequence to be joined */ - stringjoiner(const std::string &seperator, const std::vector &sequence, int begin, int end); - - /** Join elements of a deque, between (and including) begin and end - * @param seperator The string to seperate values with - * @param sequence One or more items to seperate - * @param begin The starting element in the sequence to be joined - * @param end The ending element in the sequence to be joined - */ - stringjoiner(const std::string &seperator, const std::deque &sequence, int begin, int end); - - /** Join elements of an array of char arrays, between (and including) begin and end - * @param seperator The string to seperate values with - * @param sequence One or more items to seperate - * @param begin The starting element in the sequence to be joined - * @param end The ending element in the sequence to be joined - */ - stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end); + stringjoiner(const std::string& seperator, const std::vector& sequence, unsigned int begin, unsigned int end); /** Get the joined sequence - * @return A reference to the joined string + * @return A constant reference to the joined string */ - std::string& GetJoined(); + const std::string& GetJoined() const; }; /** irc::modestacker stacks mode sequences into a list. @@ -317,10 +301,6 @@ namespace irc */ tokenstream(const std::string &source); - /** Destructor - */ - ~tokenstream(); - /** Fetch the next token from the stream as a std::string * @param token The next token available, or an empty string if none remain * @return True if tokens are left to be read, false if the last token was just retrieved. @@ -371,25 +351,21 @@ namespace irc */ sepstream(const std::string &source, char seperator); - /** Destructor - */ - virtual ~sepstream(); - /** Fetch the next token from the stream * @param token The next token from the stream is placed here * @return True if tokens still remain, false if there are none left */ - virtual bool GetToken(std::string &token); + bool GetToken(std::string& token); /** Fetch the entire remaining stream, without tokenizing * @return The remaining part of the stream */ - virtual const std::string GetRemaining(); + const std::string GetRemaining(); /** Returns true if the end of the stream has been reached * @return True if the end of the stream has been reached, otherwise false */ - virtual bool StreamEnd(); + bool StreamEnd(); }; /** A derived form of sepstream, which seperates on commas