ewmscp  ..
Classes | Public Member Functions | Static Public Member Functions | List of all members
escapism Class Referenceabstract

#include <escapism.h>

Inheritance diagram for escapism:
[legend]

Classes

class  charCodingBitPatternType
 

Public Member Functions

virtual void escape (const std::string &unEscaped, std::string &escaped) const =0
 
virtual void deEscape (const std::string &escaped, std::string &deEscaped) const =0
 

Static Public Member Functions

static const escapismnewEscaper (const std::string &name)
 
static void addAllowedNamesToOption (options::single< std::string > &option)
 
static options::single< std::string > * newEscaperOption (const std::string &name, const std::string &description, const std::string &defaultValue="Url")
 

Detailed Description

Definition at line 6 of file escapism.h.

Member Function Documentation

◆ addAllowedNamesToOption()

void escapism::addAllowedNamesToOption ( options::single< std::string > &  option)
static

Definition at line 31 of file escapism.cpp.

31  {
32  for (const auto& item : getEscapismFactoryMap()) {
33  option.fAddToRange(item.first);
34  }
35 }

References options::internal::typed_base< T, forceRangeValueTypeString >::fAddToRange(), and getEscapismFactoryMap().

Referenced by main(), and newEscaperOption().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deEscape()

virtual void escapism::deEscape ( const std::string &  escaped,
std::string &  deEscaped 
) const
pure virtual

Implemented in escapismC, and escapismUrl.

◆ escape()

virtual void escapism::escape ( const std::string &  unEscaped,
std::string &  escaped 
) const
pure virtual

Implemented in escapismC, and escapismUrl.

◆ newEscaper()

const escapism * escapism::newEscaper ( const std::string &  name)
static

Definition at line 25 of file escapism.cpp.

25  {
26  if (name == "None") {
27  return nullptr;
28  }
29  return getEscapismFactoryMap()[name]->create();
30 }

References getEscapismFactoryMap().

Referenced by dcapCommon::fixPathUrl(), main(), copyRequest::checksumTest::printResults(), copyRequest::listingRequest::printResults(), copyRequest::base::printResults(), checksumTestRequestProvider::processSource(), policyRunRequestProvider::processSource(), moveRequestProvider::processSources(), and noFollowRequestProvider::processSources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newEscaperOption()

options::single< std::string > * escapism::newEscaperOption ( const std::string &  name,
const std::string &  description,
const std::string &  defaultValue = "Url" 
)
static

Definition at line 36 of file escapism.cpp.

38  {
39  auto opt = new options::single<std::string>('\0', name, description, defaultValue);
41  if (defaultValue == "None") {
42  opt->fAddToRange(defaultValue);
43  }
44  return opt;
45 }

References addAllowedNamesToOption().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files:
options::single< std::string >
options::internal::typed_base::fAddToRange
virtual void fAddToRange(rangeValueType aValue)
add a value to the range of allowed values
Definition: Options.h:458
getEscapismFactoryMap
static std::map< std::string, escapismFactoryClass * > & getEscapismFactoryMap()
Definition: escapism.cpp:6
escapism::addAllowedNamesToOption
static void addAllowedNamesToOption(options::single< std::string > &option)
Definition: escapism.cpp:31