Reaktoro
A unified framework for modeling chemically reactive systems
StringList Class Reference

A class for representing a list of strings with special constructors. More...

#include <StringList.hpp>

Public Member Functions

 StringList ()
 Construct a default StringList instance.
 
 StringList (const char *str)
 Construct a StringList instance by breaking the words within separated by space. More...
 
 StringList (const char *str, char token)
 Construct a StringList instance by breaking the words within separated by a token. More...
 
 StringList (std::string str)
 Construct a StringList instance by breaking the words within separated by space. More...
 
 StringList (std::string str, char token)
 Construct a StringList instance by breaking the words within separated by a token. More...
 
 StringList (const std::vector< std::string > &strings)
 Construct a StringList instance with a vector of strings.
 
 StringList (std::initializer_list< std::string > strings)
 Construct a StringList with a initializer list.
 
virtual ~StringList ()
 Destroy this StringList instance.
 
auto strings () const -> const std::vector< std::string > &
 Return a vector of strings.
 
 operator const std::vector< std::string > & () const
 

Detailed Description

A class for representing a list of strings with special constructors.

Constructor & Destructor Documentation

◆ StringList() [1/4]

StringList ( const char *  str)

Construct a StringList instance by breaking the words within separated by space.

This method converts a given string into a list of strings separated by a token. However, it ignores the token inside brackets. If the token is space, then the string "hello (to you)" are split into "hello" and "(to you)".

Parameters
strThe string containing words separated by space.

◆ StringList() [2/4]

StringList ( const char *  str,
char  token 
)

Construct a StringList instance by breaking the words within separated by a token.

This method converts a given string into a list of strings separated by a token. However, it ignores the token inside brackets. If the token is space, then the string "hello (to you)" are split into "hello" and "(to you)".

Parameters
strThe string containing words separated by token.
tokenThe token used to separate the words in str.

◆ StringList() [3/4]

StringList ( std::string  str)

Construct a StringList instance by breaking the words within separated by space.

This method converts a given string into a list of strings separated by a token. However, it ignores the token inside brackets. If the token is space, then the string "hello (to you)" are split into "hello" and "(to you)".

Parameters
strThe string containing words separated by space.

◆ StringList() [4/4]

StringList ( std::string  str,
char  token 
)

Construct a StringList instance by breaking the words within separated by a token.

This method converts a given string into a list of strings separated by a token. However, it ignores the token inside brackets. If the token is space, then the string "hello (to you)" are split into "hello" and "(to you)".

Parameters
strThe string containing words separated by token.
tokenThe token used to separate the words in str.

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