mCRL2
Loading...
Searching...
No Matches
mcrl2::utilities Namespace Reference

Namespaces

namespace  detail
 
namespace  tools
 The namespace for command line tool classes.
 

Classes

class  big_natural_number
 
class  block_allocator
 The block allocator provides the allocator interface for the memory pool class. As such is can be used as an allocator for allocator aware storages. More...
 
class  cache_metric
 A helper class to keep track of the number of hits and misses for cache-like data structures. More...
 
class  execution_timer
 Simple timer to time the CPU time used by a piece of code. More...
 
class  fifo_policy
 
class  file_format
 
class  fixed_size_cache
 A cache keeps track of key-value pairs similar to a map. The difference is that a cache has (an optional) maximum size and a policy that determines what element gets evicted when the cache is full. More...
 
struct  forall
 Checks whether condition holds for all types passed as variadic template. More...
 
struct  forall< Cond, Conds... >
 
class  function_cache
 A cache keeps track of key-value pairs similar to a map. The difference is that a cache has (an optional) maximum size and a policy that determines what element gets evicted when the cache is full. More...
 
struct  function_traits
 
struct  function_traits< ReturnType(ClassType::*)(Args...) const >
 
class  hashtable
 A set that assigns each element an unique index. More...
 
class  ibitstream
 The counterpart of obitstream, guarantees that the same data is read as has been written when calling the read operators in the same sequence as the corresponding write operators. More...
 
class  indexed_set
 A set that assigns each element an unique index. More...
 
struct  is_applicable
 
struct  is_applicable2
 
struct  is_applicable2< FunctionType, ArgumentType1, ArgumentType2, typename std::result_of< FunctionType(ArgumentType1, ArgumentType2)>::type >
 
struct  is_applicable< FunctionType, ArgumentType, typename std::result_of< FunctionType(ArgumentType)>::type >
 
struct  is_constant_function_yielding
 
struct  is_iterable
 A typetrait that is std::true_type iff std::begin() and std::end() can be called on type T. More...
 
struct  is_iterable< T, std::void_t< decltype(std::begin(std::declval< T >())), decltype(std::end(std::declval< T >())) > >
 
struct  is_iterator
 A typetrait that is std::true_type iff the given type has the iterator traits. More...
 
struct  is_iterator< T, typename std::enable_if<!std::is_same< typename std::iterator_traits< T >::value_type, void >::value >::type >
 
class  lock_guard
 An exclusive lock guard for the shared_mutex. More...
 
class  memory_pool
 The memory pool allocates elements of size T from blocks. More...
 
class  mutex
 This is simply an exclusive lock based on the standard library with the ability to perform no locks when thread safety is not desired. More...
 
class  no_policy
 A policy that replaces an arbitrary (but not random) element. More...
 
class  noncopyable
 Inherit from this class to prevent it from being copyable. More...
 
class  number_postfix_generator
 Identifier generator that generates names consisting of a prefix followed by a number. For each prefix an index is maintained, that is incremented after each call to operator()(prefix). More...
 
class  obitstream
 A bitstream provides per bit writing of data to any stream (including stdout). More...
 
class  progress_meter
 Displays progress messages for a task that performs a fixed number of steps. More...
 
class  replacement_policy
 An interface to implement a replacement policy for the fixed_size_cache. More...
 
class  shared_guard
 A shared lock guard for the shared_mutex. More...
 
class  shared_mutex
 
struct  shared_mutex_data
 
class  shared_reference
 A reference counted reference to a shared_reference_counted object. More...
 
class  shared_reference_counted
 Stores a reference count that can be incremented and decremented. More...
 
struct  skip
 The skip operation with a variable number of arguments. More...
 
class  spinlock
 Implements a very simple spinlock. More...
 
class  stack_array
 Provides (a subset of) the interface of std::array<T> for a portion of preallocated memory. Can be used to interface with a portion of memory allocated on the stack,. More...
 
class  tagged_pointer
 A pointer storage object that uses a least significant bit as a mark. Can be used by objects that are 8 bytes aligned in memory. More...
 
class  unordered_map
 A class for a map of keys to values in T based using the simple hash table set implementation. More...
 
class  unordered_set
 A unordered_set with a subset of the interface of std::unordered_set that only stores a single pointer for each element. More...
 

Typedefs

template<typename Key , typename T >
using fifo_cache = fixed_size_cache< fifo_policy< mcrl2::utilities::unordered_map< Key, T > > >
 
template<typename F , typename Args >
using fifo_function_cache = function_cache< fifo_policy< mcrl2::utilities::unordered_map< Args, decltype(std::declval< F >()(std::declval< Args >()))> >, F, Args >
 
template<typename Key , typename T , typename Hash = std::hash<Key>, typename Equals = std::equal_to<Key>, typename Allocator = mcrl2::utilities::block_allocator<Key>, bool ThreadSafe = false, bool Resize = true>
using unordered_map_large = unordered_map< Key, T, Hash, Equals, Allocator, ThreadSafe, Resize >
 A specialization for large unordered maps that uses the block_allocator internally by default.
 
template<typename Key , typename Hash = std::hash<Key>, typename Equals = std::equal_to<Key>, typename Allocator = mcrl2::utilities::block_allocator<Key>, bool ThreadSafe = false>
using unordered_set_large = unordered_set< Key, Hash, Equals, Allocator, ThreadSafe >
 A specialization for large unordered sets that uses the block_allocator internally by default.
 

Functions

std::string get_executable_basename ()
 Returns the basename of a tool.
 
std::string pp (const big_natural_number &l)
 
std::ostream & operator<< (std::ostream &ss, const big_natural_number &l)
 
void swap (big_natural_number &x, big_natural_number &y)
 Standard overload of swap.
 
template<typename T >
constexpr std::size_t integer_encoding_size ()
 
float bytes_to_megabytes (std::size_t bytes)
 
template<typename T >
void print_performance_statistics (const T &unordered_set)
 Prints various information for unordered_set like data structures.
 
bool has_extension (const std::string &filename, const std::string &extension)
 Returns true if the given filename has the extension ext. The extension does not start with a dot.
 
std::ostream & operator<< (std::ostream &stream, const file_format &format)
 
bool file_exists (const std::string &filename)
 
std::size_t ceil_log2 (std::size_t n)
 
std::size_t power_size_t (const std::size_t n_in, const std::size_t m_in)
 
std::size_t parse_natural_number (const std::string &text)
 Parses a natural number from a string.
 
std::vector< std::size_t > parse_natural_number_sequence (const std::string &text)
 Parses a sequence of natural numbers (separated by spaces) from a string.
 
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
static constexpr bool is_power_of_two (T value)
 
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
static T round_up_to_power_of_two (T value)
 
template<typename Graph , typename Iter >
std::vector< std::size_t > reachable_nodes (const Graph &g, Iter first, Iter last)
 Compute reachable nodes in a graph.
 
template<typename SequenceContainer , typename OutIter , typename SequenceFunction , typename Assign >
void foreach_sequence (const SequenceContainer &X, OutIter i, SequenceFunction f, Assign assign)
 Algorithm for generating sequences. Given a sequence [X1, ..., Xn], where each element Xi is a sequence as well, this function generates all sequences [x1, ..., xn], where xi is an element of Xi for all i = 1 ... n. For each of these sequences the function f is called. The assign parameter gives the user control over how each sequence is built.
 
template<typename SequenceContainer , typename OutIter , typename SequenceFunction >
void foreach_sequence (const SequenceContainer &X, OutIter i, SequenceFunction f)
 Algorithm for generating sequences. Given a sequence [X1, ..., Xn], where each element Xi is a sequence as well, this function generates all sequences [x1, ..., xn], where xi is an element of Xi for all i = 1 ... n. For each of these sequences the function f is called.
 
template<typename T >
T * tag (const T *p)
 Applies a tag to a pointer.
 
template<typename T >
T * tag (const detail::atomic_wrapper< T * > &p)
 
template<typename T >
T * pointer (const T *p)
 
template<typename T >
T * pointer (const detail::atomic_wrapper< T * > &p)
 
template<typename T >
bool tagged (const T *p)
 
template<typename T >
bool tagged (const detail::atomic_wrapper< T * > &p)
 
char rand_alnum ()
 Generate a random alphanumeric character.
 
std::string rand_alnum_str (const std::string::size_type n)
 Generate a random string of length n.
 
bool file_exists (const char *filename)
 
std::string temporary_filename (std::string const &prefix="")
 Get filename with random suffix.
 
template<class CharContainer >
bool contains_only_ascii_symbols (const CharContainer &input)
 Checks whether the input only contains proper ascii characters, including common control characters.
 
template<typename T >
std::string to_string (const T &x)
 Transform parameter into string.
 
std::vector< std::string > split_paragraphs (const std::string &text)
 Split a string into paragraphs.
 
std::vector< std::string > split (const std::string &line, const std::string &separators)
 Split the text.
 
std::string read_text (const std::string &filename, bool warn=false)
 Read text from a file.
 
std::string read_text (std::istream &in)
 Read text from a stream.
 
std::string remove_comments (const std::string &text)
 Remove comments from a text (everything from '' until end of line).
 
std::string remove_whitespace (const std::string &text)
 Removes whitespace from a string.
 
std::string regex_replace (const std::string &src, const std::string &dest, const std::string &text)
 Regular expression replacement in a string.
 
std::vector< std::string > regex_split (const std::string &text, const std::string &sep)
 Split a string using a regular expression separator.
 
std::string trim_copy (const std::string &text)
 Remove all trailing and leading spaces from the input.
 
void trim (std::string &text)
 Remove all trailing and leading spaces from the input.
 
template<typename Container >
std::string string_join (const Container &c, const std::string &separator)
 Joins a sequence of strings. This is a replacement for boost::algorithm::join, since it gives stack overflow errors with Visual C++ express 9.0 under some circumstances.
 
std::string word_wrap_text (const std::string &text, unsigned int max_line_length=78)
 Apply word wrapping to a text.
 
bool is_numeric_string (const std::string &s)
 Test if a string is a number.
 
void number2string (std::size_t number, std::string &buffer, std::size_t start_position)
 Convert a number to a string in the buffer starting at position start_position.
 
std::string number2string (std::size_t number)
 Convert a number to string.
 
std::string get_toolset_version ()
 Get the toolset revision.
 
template<class... T>
void mcrl2_unused (T &&...)
 Function that can be used to silence unused parameter warnings.
 
template<typename Iter >
std::string substring (const std::string &s, Iter first, Iter last)
 
interface_description::mandatory_argument< std::string > make_mandatory_argument (std::string const &name, std::string const &default_value)
 
interface_description::mandatory_argument< std::string > make_mandatory_argument (std::string const &name)
 
interface_description::optional_argument< std::string > make_optional_argument (std::string const &name, std::string const &default_value)
 
static std::string mark_name_in_usage (std::string const &usage, const std::string &begin, const std::string &end)
 
static std::vector< std::string > word_wrap_line (const std::string &line, unsigned int max_line_length)
 Apply word wrapping to a text that doesn't contain newlines.
 

Variables

static constexpr std::size_t minimum_size = 4UL
 
static constexpr bool EnableReferenceCountMetrics = false
 Enable to count the number of reference count changes.
 
template<typename T >
constexpr bool is_iterable_v = is_iterable<T>::value
 
template<typename T >
constexpr bool is_iterator_v = is_iterator<T>::value
 
static constexpr bool EnableLockfreeInsertion = true
 Enables lockfree implementation of emplace.
 
static constexpr long BucketsPerMutex = 256
 Number of buckets per mutex.
 

Typedef Documentation

◆ fifo_cache

template<typename Key , typename T >
using mcrl2::utilities::fifo_cache = typedef fixed_size_cache<fifo_policy<mcrl2::utilities::unordered_map<Key, T> >>

Definition at line 149 of file fixed_size_cache.h.

◆ fifo_function_cache

template<typename F , typename Args >
using mcrl2::utilities::fifo_function_cache = typedef function_cache< fifo_policy<mcrl2::utilities::unordered_map<Args, decltype(std::declval<F>()(std::declval<Args>()))> >, F, Args>

Definition at line 152 of file fixed_size_cache.h.

◆ unordered_map_large

template<typename Key , typename T , typename Hash = std::hash<Key>, typename Equals = std::equal_to<Key>, typename Allocator = mcrl2::utilities::block_allocator<Key>, bool ThreadSafe = false, bool Resize = true>
using mcrl2::utilities::unordered_map_large = typedef unordered_map<Key, T, Hash, Equals, Allocator, ThreadSafe, Resize>

A specialization for large unordered maps that uses the block_allocator internally by default.

Definition at line 258 of file unordered_map.h.

◆ unordered_set_large

template<typename Key , typename Hash = std::hash<Key>, typename Equals = std::equal_to<Key>, typename Allocator = mcrl2::utilities::block_allocator<Key>, bool ThreadSafe = false>
using mcrl2::utilities::unordered_set_large = typedef unordered_set<Key, Hash, Equals, Allocator, ThreadSafe>

A specialization for large unordered sets that uses the block_allocator internally by default.

Definition at line 393 of file unordered_set.h.

Function Documentation

◆ bytes_to_megabytes()

float mcrl2::utilities::bytes_to_megabytes ( std::size_t  bytes)
inline

Definition at line 27 of file unordered_set_implementation.h.

◆ ceil_log2()

std::size_t mcrl2::utilities::ceil_log2 ( std::size_t  n)
inline

Definition at line 28 of file math.h.

◆ contains_only_ascii_symbols()

template<class CharContainer >
bool mcrl2::utilities::contains_only_ascii_symbols ( const CharContainer &  input)
inline

Checks whether the input only contains proper ascii characters, including common control characters.

Parameters
inputThe string to be checked.
Returns
true iff the input consists of ordinary ascii characters only.

Definition at line 34 of file text_utility.h.

◆ file_exists() [1/2]

bool mcrl2::utilities::file_exists ( const char *  filename)
inline

Definition at line 55 of file test_utilities.h.

◆ file_exists() [2/2]

bool mcrl2::utilities::file_exists ( const std::string &  filename)
inline

Definition at line 98 of file file_utility.h.

◆ foreach_sequence() [1/2]

template<typename SequenceContainer , typename OutIter , typename SequenceFunction >
void mcrl2::utilities::foreach_sequence ( const SequenceContainer &  X,
OutIter  i,
SequenceFunction  f 
)

Algorithm for generating sequences. Given a sequence [X1, ..., Xn], where each element Xi is a sequence as well, this function generates all sequences [x1, ..., xn], where xi is an element of Xi for all i = 1 ... n. For each of these sequences the function f is called.

Parameters
XA sequence.
iAn output iterator to where the generated sequences are written.
fA function that is called for each generated sequence.

Definition at line 102 of file sequence.h.

◆ foreach_sequence() [2/2]

template<typename SequenceContainer , typename OutIter , typename SequenceFunction , typename Assign >
void mcrl2::utilities::foreach_sequence ( const SequenceContainer &  X,
OutIter  i,
SequenceFunction  f,
Assign  assign 
)

Algorithm for generating sequences. Given a sequence [X1, ..., Xn], where each element Xi is a sequence as well, this function generates all sequences [x1, ..., xn], where xi is an element of Xi for all i = 1 ... n. For each of these sequences the function f is called. The assign parameter gives the user control over how each sequence is built.

Parameters
XA sequence.
iAn output iterator to where the generated sequences are written.
fA function that is called for each generated sequence.
assignThe assign operation is called to assign values to the generated sequence.

Definition at line 81 of file sequence.h.

◆ get_executable_basename()

std::string mcrl2::utilities::get_executable_basename ( )
inline

Returns the basename of a tool.

Returns
A string

Definition at line 41 of file basename.h.

◆ get_toolset_version()

std::string mcrl2::utilities::get_toolset_version ( )

Get the toolset revision.

Returns
A string representation of the toolset revision

Definition at line 22 of file toolset_version.cpp.

◆ has_extension()

bool mcrl2::utilities::has_extension ( const std::string &  filename,
const std::string &  extension 
)
inline

Returns true if the given filename has the extension ext. The extension does not start with a dot.

Definition at line 27 of file file_utility.h.

◆ integer_encoding_size()

template<typename T >
constexpr std::size_t mcrl2::utilities::integer_encoding_size ( )
constexpr
Returns
The number of bits needed to represent a value of type T in most significant bit encoding.

Definition at line 24 of file bitstream.h.

◆ is_numeric_string()

bool mcrl2::utilities::is_numeric_string ( const std::string &  s)

Test if a string is a number.

Parameters
sA string of text.
Returns
True if s is of the form "0 | -? [1-9][0-9]*", false otherwise

Definition at line 210 of file text_utility.cpp.

◆ is_power_of_two()

template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
static constexpr bool mcrl2::utilities::is_power_of_two ( value)
staticconstexpr
Returns
True when the given value is a power of two.

Definition at line 26 of file power_of_two.h.

◆ make_mandatory_argument() [1/2]

interface_description::mandatory_argument< std::string > mcrl2::utilities::make_mandatory_argument ( std::string const &  name)

Definition at line 328 of file command_line_interface.cpp.

◆ make_mandatory_argument() [2/2]

interface_description::mandatory_argument< std::string > mcrl2::utilities::make_mandatory_argument ( std::string const &  name,
std::string const &  default_value 
)

Definition at line 321 of file command_line_interface.cpp.

◆ make_optional_argument()

interface_description::optional_argument< std::string > mcrl2::utilities::make_optional_argument ( std::string const &  name,
std::string const &  default_value 
)

Definition at line 335 of file command_line_interface.cpp.

◆ mark_name_in_usage()

static std::string mcrl2::utilities::mark_name_in_usage ( std::string const &  usage,
const std::string &  begin,
const std::string &  end 
)
inlinestatic

Definition at line 479 of file command_line_interface.cpp.

◆ mcrl2_unused()

template<class... T>
void mcrl2::utilities::mcrl2_unused ( T &&  ...)

Function that can be used to silence unused parameter warnings.

Definition at line 20 of file unused.h.

◆ number2string() [1/2]

std::string mcrl2::utilities::number2string ( std::size_t  number)
inline

Convert a number to string.

This function is much faster than std::to_string and its use is therefore preferred in those cases were performance counts.

Parameters
numberA number to be transformed.

Definition at line 188 of file text_utility.h.

◆ number2string() [2/2]

void mcrl2::utilities::number2string ( std::size_t  number,
std::string &  buffer,
std::size_t  start_position 
)
inline

Convert a number to a string in the buffer starting at position start_position.

Parameters
numberThe number to be converted.
bufferA buffer in which the string will be stored that is sufficiently large.
start_positionThe first position where a number is written.

Definition at line 158 of file text_utility.h.

◆ operator<<() [1/2]

std::ostream & mcrl2::utilities::operator<< ( std::ostream &  ss,
const big_natural_number l 
)
inline

Definition at line 743 of file big_numbers.h.

◆ operator<<() [2/2]

std::ostream & mcrl2::utilities::operator<< ( std::ostream &  stream,
const file_format format 
)
inline

Definition at line 92 of file file_utility.h.

◆ parse_natural_number()

std::size_t mcrl2::utilities::parse_natural_number ( const std::string &  text)
inline

Parses a natural number from a string.

Definition at line 69 of file parse_numbers.h.

◆ parse_natural_number_sequence()

std::vector< std::size_t > mcrl2::utilities::parse_natural_number_sequence ( const std::string &  text)
inline

Parses a sequence of natural numbers (separated by spaces) from a string.

Definition at line 98 of file parse_numbers.h.

◆ pointer() [1/2]

template<typename T >
T * mcrl2::utilities::pointer ( const detail::atomic_wrapper< T * > &  p)

Definition at line 44 of file tagged_pointer.h.

◆ pointer() [2/2]

template<typename T >
T * mcrl2::utilities::pointer ( const T *  p)
Returns
The original pointer that can be deferenced.

Definition at line 38 of file tagged_pointer.h.

◆ power_size_t()

std::size_t mcrl2::utilities::power_size_t ( const std::size_t  n_in,
const std::size_t  m_in 
)
inline

Definition at line 42 of file math.h.

◆ pp()

std::string mcrl2::utilities::pp ( const big_natural_number l)
inline

Definition at line 800 of file big_numbers.h.

◆ print_performance_statistics()

template<typename T >
void mcrl2::utilities::print_performance_statistics ( const T &  unordered_set)

Prints various information for unordered_set like data structures.

Definition at line 238 of file unordered_set_implementation.h.

◆ rand_alnum()

char mcrl2::utilities::rand_alnum ( )
inline

Generate a random alphanumeric character.

Definition at line 30 of file test_utilities.h.

◆ rand_alnum_str()

std::string mcrl2::utilities::rand_alnum_str ( const std::string::size_type  n)
inline

Generate a random string of length n.

Definition at line 46 of file test_utilities.h.

◆ reachable_nodes()

template<typename Graph , typename Iter >
std::vector< std::size_t > mcrl2::utilities::reachable_nodes ( const Graph &  g,
Iter  first,
Iter  last 
)

Compute reachable nodes in a graph.

Parameters
gA graph.
firstIterator to the first node.
lastIterator to the last node.
Returns
The indices of the nodes that are reachable from the nodes given by the range of vertex descriptors [first, last].

Definition at line 59 of file reachable_nodes.h.

◆ read_text() [1/2]

std::string mcrl2::utilities::read_text ( const std::string &  filename,
bool  warn = false 
)

Read text from a file.

Parameters
filenameA string
warnIf true, a warning is printed to standard error if the file is not found
Returns
The contents of the file

Definition at line 66 of file text_utility.cpp.

◆ read_text() [2/2]

std::string mcrl2::utilities::read_text ( std::istream &  in)
inline

Read text from a stream.

Parameters
inAn input stream
Returns
The text read from the stream

Definition at line 81 of file text_utility.h.

◆ regex_replace()

std::string mcrl2::utilities::regex_replace ( const std::string &  src,
const std::string &  dest,
const std::string &  text 
)

Regular expression replacement in a string.

Parameters
srcA string
destA string
textA string
Returns
The transformed string

Definition at line 120 of file text_utility.cpp.

◆ regex_split()

std::vector< std::string > mcrl2::utilities::regex_split ( const std::string &  text,
const std::string &  sep 
)

Split a string using a regular expression separator.

Parameters
textA string
sepA string
Returns
The splitted string

Definition at line 129 of file text_utility.cpp.

◆ remove_comments()

std::string mcrl2::utilities::remove_comments ( const std::string &  text)

Remove comments from a text (everything from '' until end of line).

Parameters
textA string
Returns
The removal result

Definition at line 96 of file text_utility.cpp.

◆ remove_whitespace()

std::string mcrl2::utilities::remove_whitespace ( const std::string &  text)

Removes whitespace from a string.

Parameters
textA string
Returns
The removal result

Definition at line 108 of file text_utility.cpp.

◆ round_up_to_power_of_two()

template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
static T mcrl2::utilities::round_up_to_power_of_two ( value)
static
Returns
The smallest power of two that is larger than the given value.

Definition at line 35 of file power_of_two.h.

◆ split()

std::vector< std::string > mcrl2::utilities::split ( const std::string &  line,
const std::string &  separators 
)

Split the text.

Parameters
lineA string
separatorsA string
Returns
The splitted text

Definition at line 55 of file text_utility.cpp.

◆ split_paragraphs()

std::vector< std::string > mcrl2::utilities::split_paragraphs ( const std::string &  text)

Split a string into paragraphs.

Parameters
textA string
Returns
The paragraphs of text

Definition at line 27 of file text_utility.cpp.

◆ string_join()

template<typename Container >
std::string mcrl2::utilities::string_join ( const Container &  c,
const std::string &  separator 
)

Joins a sequence of strings. This is a replacement for boost::algorithm::join, since it gives stack overflow errors with Visual C++ express 9.0 under some circumstances.

Definition at line 129 of file text_utility.h.

◆ substring()

template<typename Iter >
std::string mcrl2::utilities::substring ( const std::string &  s,
Iter  first,
Iter  last 
)

Definition at line 22 of file command_line_interface.cpp.

◆ swap()

void mcrl2::utilities::swap ( big_natural_number x,
big_natural_number y 
)
inline

Standard overload of swap.

Definition at line 770 of file big_numbers.h.

◆ tag() [1/2]

template<typename T >
T * mcrl2::utilities::tag ( const detail::atomic_wrapper< T * > &  p)

Definition at line 31 of file tagged_pointer.h.

◆ tag() [2/2]

template<typename T >
T * mcrl2::utilities::tag ( const T *  p)

Applies a tag to a pointer.

Returns
A pointer where one bit that is unused is set to one.

Definition at line 25 of file tagged_pointer.h.

◆ tagged() [1/2]

template<typename T >
bool mcrl2::utilities::tagged ( const detail::atomic_wrapper< T * > &  p)

Definition at line 57 of file tagged_pointer.h.

◆ tagged() [2/2]

template<typename T >
bool mcrl2::utilities::tagged ( const T *  p)
Returns
True iff this pointer has been tagged.

Definition at line 51 of file tagged_pointer.h.

◆ temporary_filename()

std::string mcrl2::utilities::temporary_filename ( std::string const &  prefix = "")
inline

Get filename with random suffix.

Warning
is prone to race conditions

Definition at line 64 of file test_utilities.h.

◆ to_string()

template<typename T >
std::string mcrl2::utilities::to_string ( const T &  x)
inline

Transform parameter into string.

Parameters
xSome expression
Precondition
type T has operator <<
Returns
The string representation of x.

Definition at line 53 of file text_utility.h.

◆ trim()

void mcrl2::utilities::trim ( std::string &  text)

Remove all trailing and leading spaces from the input.

Parameters
textA string

Definition at line 223 of file text_utility.cpp.

◆ trim_copy()

std::string mcrl2::utilities::trim_copy ( const std::string &  text)

Remove all trailing and leading spaces from the input.

Parameters
textA string
Returns
The trimmed string

Definition at line 218 of file text_utility.cpp.

◆ word_wrap_line()

static std::vector< std::string > mcrl2::utilities::word_wrap_line ( const std::string &  line,
unsigned int  max_line_length 
)
static

Apply word wrapping to a text that doesn't contain newlines.

Parameters
lineA string of text.
max_line_lengthThe maximum line length.
Returns
The wrapped text.

Definition at line 155 of file text_utility.cpp.

◆ word_wrap_text()

std::string mcrl2::utilities::word_wrap_text ( const std::string &  text,
unsigned int  max_line_length = 78 
)

Apply word wrapping to a text.

Parameters
textA string of text.
max_line_lengthThe maximum line length.
Returns
The wrapped text.

Definition at line 186 of file text_utility.cpp.

Variable Documentation

◆ BucketsPerMutex

constexpr long mcrl2::utilities::BucketsPerMutex = 256
staticconstexpr

Number of buckets per mutex.

Definition at line 27 of file unordered_set.h.

◆ EnableLockfreeInsertion

constexpr bool mcrl2::utilities::EnableLockfreeInsertion = true
staticconstexpr

Enables lockfree implementation of emplace.

Definition at line 24 of file unordered_set.h.

◆ EnableReferenceCountMetrics

constexpr bool mcrl2::utilities::EnableReferenceCountMetrics = false
staticconstexpr

Enable to count the number of reference count changes.

Definition at line 27 of file shared_reference.h.

◆ is_iterable_v

template<typename T >
constexpr bool mcrl2::utilities::is_iterable_v = is_iterable<T>::value
constexpr

Definition at line 50 of file type_traits.h.

◆ is_iterator_v

template<typename T >
constexpr bool mcrl2::utilities::is_iterator_v = is_iterator<T>::value
constexpr

Definition at line 53 of file type_traits.h.

◆ minimum_size

constexpr std::size_t mcrl2::utilities::minimum_size = 4UL
staticconstexpr

Definition at line 25 of file unordered_set_implementation.h.