LMMS
Loading...
Searching...
No Matches
utils.h File Reference
#include <errno.h>
#include <map>
#include <string>
#include <sys/types.h>
#include <vector>
#include <dirent.h>
#include <pthread.h>

Go to the source code of this file.

Classes

class  calf_utils::ptmutex
 Pthreads based mutex class. More...
class  calf_utils::ptlock_base
class  calf_utils::ptlock
 Exception-safe mutex lock. More...
class  calf_utils::pttrylock
 Exception-safe polling mutex lock. More...
class  calf_utils::scope_assign< T, Tref >
 Exception-safe temporary assignment. More...
struct  calf_utils::text_exception
struct  calf_utils::file_exception
struct  calf_utils::direntry
 List contents of a directory. More...

Namespaces

namespace  calf_utils

Macros

#define STACKALLOC(type, name, size)

Typedefs

typedef std::map< std::string, std::string > calf_utils::dictionary
 String-to-string mapping.

Functions

std::string calf_utils::encode_map (const dictionary &data)
 Serialize a dictionary to a string.
void calf_utils::decode_map (dictionary &data, const std::string &src)
 Deserialize a dictionary from a string.
std::string calf_utils::i2s (int value)
 int-to-string
std::string calf_utils::f2s (double value)
 float-to-string
std::string calf_utils::ff2s (double value)
 float-to-string-that-doesn't-resemble-an-int
std::string calf_utils::to_xml_attr (const std::string &key, const std::string &value)
 Encode a key-value pair as XML attribute.
std::string calf_utils::xml_escape (const std::string &src)
 Escape a string to be used in XML file.
std::string calf_utils::load_file (const std::string &src)
 Load file from disk into a std::string blob, or throw file_exception.
std::string calf_utils::indent (const std::string &src, const std::string &indent)
 Indent a string by another string (prefix each line).
std::vector< direntrycalf_utils::list_directory (const std::string &path)

Macro Definition Documentation

◆ STACKALLOC

#define STACKALLOC ( type,
name,
size )
Value:
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
static const char * name
Definition pugl.h:1582
ulg size
Definition extract.c:2350