libhext: C++ Library Documentation  1.0.8-3ad0ae4
Public Types | Public Member Functions | List of all members
hext::CasePipe Class Referencefinal

Changes the case of a string. Changes to lower case by default. More...

Inheritance diagram for hext::CasePipe:
Inheritance graph
[legend]
Collaboration diagram for hext::CasePipe:
Collaboration graph
[legend]

Public Types

enum  Option { ToLower = 1 << 1 , ToUpper = 1 << 2 }
 CasePipe's options. More...
 

Public Member Functions

 CasePipe (Option option=Option::ToLower) noexcept
 Constructs a CasePipe. More...
 
std::string transform (std::string str) const override
 Changes the case of str. More...
 
- Public Member Functions inherited from hext::Cloneable< CasePipe, StringPipe >
virtual std::unique_ptr< StringPipeclone () const override
 Clones objects of template type Derived and returns an owning pointer to the newly allocated Base. More...
 
- Public Member Functions inherited from hext::StringPipe
 StringPipe () noexcept
 
 StringPipe (const StringPipe &other)
 
 StringPipe (StringPipe &&) noexcept=default
 
StringPipeoperator= (const StringPipe &other)
 
StringPipeoperator= (StringPipe &&) noexcept=default
 
virtual ~StringPipe () noexcept=default
 
std::string pipe (std::string str) const
 Calls StringPipe::transform successively until the whole StringPipe chain was traversed. More...
 
void append (std::unique_ptr< StringPipe > pipe) noexcept
 Append a StringPipe at the end of the chain. More...
 
template<typename StringPipeType , typename... Args>
void emplace (Args &&... arg)
 Construct a StringPipe at the end of the chain. More...
 

Detailed Description

Changes the case of a string. Changes to lower case by default.

Definition at line 32 of file CasePipe.h.

Member Enumeration Documentation

◆ Option

CasePipe's options.

Enumerator
ToLower 
ToUpper 

Definition at line 36 of file CasePipe.h.

Constructor & Destructor Documentation

◆ CasePipe()

hext::CasePipe::CasePipe ( Option  option = Option::ToLower)
explicitnoexcept

Constructs a CasePipe.

Parameters
optionChange the string to this case. Default: to lower case.

Member Function Documentation

◆ transform()

std::string hext::CasePipe::transform ( std::string  str) const
overridevirtual

Changes the case of str.

Implements hext::StringPipe.


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