spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Modules | Classes | Functions
Miscellaneous helper algorithms

Whether a word is bare. More...

Modules

 Hashing functions
 
 Random functions
 

Classes

struct  spot::bdd_less_than
 Comparison functor for BDDs. More...
 
struct  spot::bdd_hash
 Hash functor for BDDs. More...
 
class  spot::bitvect
 A bit vector. More...
 
class  spot::bitvect_array
 
struct  spot::char_ptr_less_than
 Strict Weak Ordering for char*. More...
 
class  spot::minato_isop
 Generate an irredundant sum-of-products (ISOP) form of a BDD function. More...
 
class  spot::option_map
 Manage a map of options. More...
 
struct  spot::time_info
 A structure to record elapsed time in clock ticks. More...
 
class  spot::timer
 A timekeeper that accumulate interval of time. More...
 
class  spot::timer_map
 A map of timer, where each timer has a name. More...
 
class  spot::temporary_file
 Temporary file name. More...
 
class  spot::open_temporary_file
 Open temporary file. More...
 

Functions

SPOT_API bool spot::is_bare_word (const char *str)
 
SPOT_API std::string spot::quote_unless_bare_word (const std::string &str)
 Double-quote words that are not bare. More...
 
SPOT_API bitvect * spot::make_bitvect (size_t bitcount)
 Allocate a bit-vector of bitcount bits. More...
 
SPOT_API bitvect_array * spot::make_bitvect_array (size_t bitcount, size_t vectcount)
 Allocate vectcount bit-vectors of bitcount bits. More...
 
SPOT_API std::ostream & spot::escape_rfc4180 (std::ostream &os, const std::string &str)
 Double characters " in strings. More...
 
SPOT_API std::ostream & spot::escape_str (std::ostream &os, const std::string &str)
 Escape characters ", \, and \n in str. More...
 
SPOT_API std::string spot::escape_str (const std::string &str)
 Escape characters ", \, and \n in str. More...
 
SPOT_API void spot::trim (std::string &str)
 Remove spaces at the front and back of str. More...
 
SPOT_API void spot::int_array_array_compress2 (const int *array, size_t n, int *dest, size_t &dest_size)
 Compress an int array of size n into a int array. More...
 
SPOT_API void spot::int_array_array_decompress2 (const int *array, size_t array_size, int *res, size_t size)
 Uncompress an int array of size array_size into a int array of size size. More...
 
SPOT_API void spot::int_vector_vector_compress (const std::vector< int > &input, std::vector< unsigned int > &output)
 Compress an int vector into a vector of unsigned int. More...
 
SPOT_API void spot::int_vector_vector_decompress (const std::vector< unsigned int > &array, std::vector< int > &output, size_t size)
 Uncompress a vector of unsigned int into a vector of size size. More...
 
SPOT_API const std::vector
< unsigned int > * 
spot::int_array_vector_compress (const int *array, size_t n)
 Compress an int array if size n into a vector of unsigned int. More...
 
SPOT_API void spot::int_vector_array_decompress (const std::vector< unsigned int > *array, int *res, size_t size)
 Uncompress a vector of unsigned int into an int array of size size. More...
 
SPOT_API void spot::int_array_array_compress (const int *array, size_t n, int *dest, size_t &dest_size)
 Compress an int array of size n into a int array. More...
 
SPOT_API void spot::int_array_array_decompress (const int *array, size_t array_size, int *res, size_t size)
 Uncompress an int array of size array_size into a int array of size size. More...
 
SPOT_API temporary_file * spot::create_tmpfile (const char *prefix, const char *suffix=0) throw (std::bad_alloc, std::runtime_error)
 Create a temporary file. More...
 
SPOT_API open_temporary_file * spot::create_open_tmpfile (const char *prefix, const char *suffix=0) throw (std::bad_alloc, std::runtime_error)
 Create a temporary file and leave it open for writing. More...
 
SPOT_API void spot::cleanup_tmpfiles ()
 Delete all temporary files. More...
 
SPOT_API const char * spot::version ()
 Return Spot's version. More...
 

Detailed Description

Whether a word is bare.

Bare words should start with a letter, an underscore, or a dot, and consist solely of alphanumeric characters, underscores, and dots.

Function Documentation

SPOT_API void spot::cleanup_tmpfiles ( )

Delete all temporary files.

Delete all temporary files that have been created but haven't been deleted so far. The verb "delete" should be understood as both the C++ delete operator (all temporary_file and open_temporary_file instance are destroyed) and as the file system operation (the actual files are removed).

Even in programs where temporary_file instance are consciously destroyed when they are not needed, cleanup_tmpfiles() could still be useful in signal handlers, for instance to clean all temporary files upon SIGINT.

SPOT_API open_temporary_file* spot::create_open_tmpfile ( const char *  prefix,
const char *  suffix = 0 
)
throw (std::bad_alloc,
std::runtime_error
)

Create a temporary file and leave it open for writing.

Same as create_tmpfile, be leave the file open for writing. The open_temporary_file::fd() method returns the file descriptor.

SPOT_API temporary_file* spot::create_tmpfile ( const char *  prefix,
const char *  suffix = 0 
)
throw (std::bad_alloc,
std::runtime_error
)

Create a temporary file.

The file name will start with prefix, be followed by 6 randomish characters and will end in suffix. Usually suffix is used to set an extension (you should include the dot).

The temporary file is created and left empty. If you need to fill it, consider using create_open_tmpfile() instead.

SPOT_API std::ostream& spot::escape_rfc4180 ( std::ostream &  os,
const std::string &  str 
)

Double characters " in strings.

In CSV files, as defined by RFC4180, double-quoted string that contain double-quotes should simply duplicate those quotes.

SPOT_API std::ostream& spot::escape_str ( std::ostream &  os,
const std::string &  str 
)

Escape characters ", \, and \n in str.

SPOT_API std::string spot::escape_str ( const std::string &  str)

Escape characters ", \, and \n in str.

SPOT_API void spot::int_array_array_compress ( const int *  array,
size_t  n,
int *  dest,
size_t &  dest_size 
)

Compress an int array of size n into a int array.

The destination array should be at least dest_size large An assert will be triggered if dest_size is too small. On return, dest_size will be set to the actually number of int filled in dest

SPOT_API void spot::int_array_array_compress2 ( const int *  array,
size_t  n,
int *  dest,
size_t &  dest_size 
)

Compress an int array of size n into a int array.

The destination array should be at least dest_size large An assert will be triggered if dest_size is too small. On return, dest_size will be set to the actually number of int filled in dest

SPOT_API void spot::int_array_array_decompress ( const int *  array,
size_t  array_size,
int *  res,
size_t  size 
)

Uncompress an int array of size array_size into a int array of size size.

size must be the exact expected size of uncompressed array.

SPOT_API void spot::int_array_array_decompress2 ( const int *  array,
size_t  array_size,
int *  res,
size_t  size 
)

Uncompress an int array of size array_size into a int array of size size.

size must be the exact expected size of uncompressed array.

SPOT_API const std::vector<unsigned int>* spot::int_array_vector_compress ( const int *  array,
size_t  n 
)

Compress an int array if size n into a vector of unsigned int.

SPOT_API void spot::int_vector_array_decompress ( const std::vector< unsigned int > *  array,
int *  res,
size_t  size 
)

Uncompress a vector of unsigned int into an int array of size size.

size must be the exact expected size of uncompressed array.

SPOT_API void spot::int_vector_vector_compress ( const std::vector< int > &  input,
std::vector< unsigned int > &  output 
)

Compress an int vector into a vector of unsigned int.

SPOT_API void spot::int_vector_vector_decompress ( const std::vector< unsigned int > &  array,
std::vector< int > &  output,
size_t  size 
)

Uncompress a vector of unsigned int into a vector of size size.

size must be the exact expected size of uncompressed array.

SPOT_API bitvect* spot::make_bitvect ( size_t  bitcount)

Allocate a bit-vector of bitcount bits.

The resulting object should be released with delete.

SPOT_API bitvect_array* spot::make_bitvect_array ( size_t  bitcount,
size_t  vectcount 
)

Allocate vectcount bit-vectors of bitcount bits.

The resulting bitvect_array should be released with delete.

SPOT_API std::string spot::quote_unless_bare_word ( const std::string &  str)

Double-quote words that are not bare.

See Also
is_bare_word
SPOT_API void spot::trim ( std::string &  str)

Remove spaces at the front and back of str.

SPOT_API const char* spot::version ( )

Return Spot's version.


Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu May 15 2014 11:04:11 for spot by doxygen 1.8.4