GNU Radio 3.2.2 C++ API
|
#include <boost/shared_ptr.hpp>
#include <boost/any.hpp>
#include <complex>
#include <string>
#include <stdint.h>
#include <iosfwd>
#include <stdexcept>
Go to the source code of this file.
Classes | |
class | pmt_exception |
class | pmt_wrong_type |
class | pmt_out_of_range |
class | pmt_notimplemented |
Typedefs | |
typedef boost::shared_ptr < pmt_base > | pmt_t |
typedef for shared pointer (transparent reference counting). See http://www.boost.org/libs/smart_ptr/smart_ptr.htm | |
Functions | |
bool | pmt_is_bool (pmt_t obj) |
Return true if obj is #t or #f, else return false. | |
bool | pmt_is_true (pmt_t obj) |
Return false if obj is #f, else return true. | |
bool | pmt_is_false (pmt_t obj) |
Return true if obj is #f, else return true. | |
pmt_t | pmt_from_bool (bool val) |
Return #f is val is false, else return #t. | |
bool | pmt_to_bool (pmt_t val) |
Return true if val is PMT_T, return false when val is PMT_F,. | |
bool | pmt_is_symbol (pmt_t obj) |
Return true if obj is a symbol, else false. | |
pmt_t | pmt_string_to_symbol (const std::string &s) |
Return the symbol whose name is s . | |
pmt_t | pmt_intern (const std::string &s) |
Alias for pmt_string_to_symbol. | |
const std::string | pmt_symbol_to_string (pmt_t sym) |
bool | pmt_is_number (pmt_t obj) |
Return true if obj is any kind of number, else false. | |
bool | pmt_is_integer (pmt_t x) |
Return true if x is an integer number, else false. | |
pmt_t | pmt_from_long (long x) |
Return the pmt value that represents the integer x . | |
long | pmt_to_long (pmt_t x) |
Convert pmt to long if possible. | |
bool | pmt_is_real (pmt_t obj) |
pmt_t | pmt_from_double (double x) |
Return the pmt value that represents double x . | |
double | pmt_to_double (pmt_t x) |
Convert pmt to double if possible. | |
bool | pmt_is_complex (pmt_t obj) |
return true if obj is a complex number, false otherwise. | |
pmt_t | pmt_make_rectangular (double re, double im) |
Return a complex number constructed of the given real and imaginary parts. | |
std::complex< double > | pmt_to_complex (pmt_t z) |
bool | pmt_is_null (pmt_t x) |
Return true if x is the empty list, otherwise return false. | |
bool | pmt_is_pair (pmt_t obj) |
Return true if obj is a pair, else false. | |
pmt_t | pmt_cons (pmt_t x, pmt_t y) |
Return a newly allocated pair whose car is x and whose cdr is y . | |
pmt_t | pmt_car (pmt_t pair) |
If pair is a pair, return the car of the pair , otherwise raise wrong_type. | |
pmt_t | pmt_cdr (pmt_t pair) |
If pair is a pair, return the cdr of the pair , otherwise raise wrong_type. | |
void | pmt_set_car (pmt_t pair, pmt_t value) |
Stores value in the car field of pair . | |
void | pmt_set_cdr (pmt_t pair, pmt_t value) |
Stores value in the cdr field of pair . | |
pmt_t | pmt_caar (pmt_t pair) |
pmt_t | pmt_cadr (pmt_t pair) |
pmt_t | pmt_cdar (pmt_t pair) |
pmt_t | pmt_cddr (pmt_t pair) |
pmt_t | pmt_caddr (pmt_t pair) |
pmt_t | pmt_cadddr (pmt_t pair) |
bool | pmt_is_vector (pmt_t x) |
Return true if x is a vector, othewise false. | |
pmt_t | pmt_make_vector (size_t k, pmt_t fill) |
Make a vector of length k , with initial values set to fill . | |
pmt_t | pmt_vector_ref (pmt_t vector, size_t k) |
void | pmt_vector_set (pmt_t vector, size_t k, pmt_t obj) |
Store obj in position k . | |
void | pmt_vector_fill (pmt_t vector, pmt_t fill) |
Store fill in every position of vector . | |
bool | pmt_is_uniform_vector (pmt_t x) |
true if x is any kind of uniform numeric vector | |
bool | pmt_is_u8vector (pmt_t x) |
bool | pmt_is_s8vector (pmt_t x) |
bool | pmt_is_u16vector (pmt_t x) |
bool | pmt_is_s16vector (pmt_t x) |
bool | pmt_is_u32vector (pmt_t x) |
bool | pmt_is_s32vector (pmt_t x) |
bool | pmt_is_u64vector (pmt_t x) |
bool | pmt_is_s64vector (pmt_t x) |
bool | pmt_is_f32vector (pmt_t x) |
bool | pmt_is_f64vector (pmt_t x) |
bool | pmt_is_c32vector (pmt_t x) |
bool | pmt_is_c64vector (pmt_t x) |
pmt_t | pmt_make_u8vector (size_t k, uint8_t fill) |
pmt_t | pmt_make_s8vector (size_t k, int8_t fill) |
pmt_t | pmt_make_u16vector (size_t k, uint16_t fill) |
pmt_t | pmt_make_s16vector (size_t k, int16_t fill) |
pmt_t | pmt_make_u32vector (size_t k, uint32_t fill) |
pmt_t | pmt_make_s32vector (size_t k, int32_t fill) |
pmt_t | pmt_make_u64vector (size_t k, uint64_t fill) |
pmt_t | pmt_make_s64vector (size_t k, int64_t fill) |
pmt_t | pmt_make_f32vector (size_t k, float fill) |
pmt_t | pmt_make_f64vector (size_t k, double fill) |
pmt_t | pmt_make_c32vector (size_t k, std::complex< float > fill) |
pmt_t | pmt_make_c64vector (size_t k, std::complex< double > fill) |
pmt_t | pmt_init_u8vector (size_t k, const uint8_t *data) |
pmt_t | pmt_init_s8vector (size_t k, const int8_t *data) |
pmt_t | pmt_init_u16vector (size_t k, const uint16_t *data) |
pmt_t | pmt_init_s16vector (size_t k, const int16_t *data) |
pmt_t | pmt_init_u32vector (size_t k, const uint32_t *data) |
pmt_t | pmt_init_s32vector (size_t k, const int32_t *data) |
pmt_t | pmt_init_u64vector (size_t k, const uint64_t *data) |
pmt_t | pmt_init_s64vector (size_t k, const int64_t *data) |
pmt_t | pmt_init_f32vector (size_t k, const float *data) |
pmt_t | pmt_init_f64vector (size_t k, const double *data) |
pmt_t | pmt_init_c32vector (size_t k, const std::complex< float > *data) |
pmt_t | pmt_init_c64vector (size_t k, const std::complex< double > *data) |
uint8_t | pmt_u8vector_ref (pmt_t v, size_t k) |
int8_t | pmt_s8vector_ref (pmt_t v, size_t k) |
uint16_t | pmt_u16vector_ref (pmt_t v, size_t k) |
int16_t | pmt_s16vector_ref (pmt_t v, size_t k) |
uint32_t | pmt_u32vector_ref (pmt_t v, size_t k) |
int32_t | pmt_s32vector_ref (pmt_t v, size_t k) |
uint64_t | pmt_u64vector_ref (pmt_t v, size_t k) |
int64_t | pmt_s64vector_ref (pmt_t v, size_t k) |
float | pmt_f32vector_ref (pmt_t v, size_t k) |
double | pmt_f64vector_ref (pmt_t v, size_t k) |
std::complex< float > | pmt_c32vector_ref (pmt_t v, size_t k) |
std::complex< double > | pmt_c64vector_ref (pmt_t v, size_t k) |
void | pmt_u8vector_set (pmt_t v, size_t k, uint8_t x) |
void | pmt_s8vector_set (pmt_t v, size_t k, int8_t x) |
void | pmt_u16vector_set (pmt_t v, size_t k, uint16_t x) |
void | pmt_s16vector_set (pmt_t v, size_t k, int16_t x) |
void | pmt_u32vector_set (pmt_t v, size_t k, uint32_t x) |
void | pmt_s32vector_set (pmt_t v, size_t k, int32_t x) |
void | pmt_u64vector_set (pmt_t v, size_t k, uint64_t x) |
void | pmt_s64vector_set (pmt_t v, size_t k, int64_t x) |
void | pmt_f32vector_set (pmt_t v, size_t k, float x) |
void | pmt_f64vector_set (pmt_t v, size_t k, double x) |
void | pmt_c32vector_set (pmt_t v, size_t k, std::complex< float > x) |
void | pmt_c64vector_set (pmt_t v, size_t k, std::complex< double > x) |
const void * | pmt_uniform_vector_elements (pmt_t v, size_t &len) |
const uint8_t * | pmt_u8vector_elements (pmt_t v, size_t &len) |
const int8_t * | pmt_s8vector_elements (pmt_t v, size_t &len) |
const uint16_t * | pmt_u16vector_elements (pmt_t v, size_t &len) |
const int16_t * | pmt_s16vector_elements (pmt_t v, size_t &len) |
const uint32_t * | pmt_u32vector_elements (pmt_t v, size_t &len) |
const int32_t * | pmt_s32vector_elements (pmt_t v, size_t &len) |
const uint64_t * | pmt_u64vector_elements (pmt_t v, size_t &len) |
const int64_t * | pmt_s64vector_elements (pmt_t v, size_t &len) |
const float * | pmt_f32vector_elements (pmt_t v, size_t &len) |
const double * | pmt_f64vector_elements (pmt_t v, size_t &len) |
const std::complex< float > * | pmt_c32vector_elements (pmt_t v, size_t &len) |
const std::complex< double > * | pmt_c64vector_elements (pmt_t v, size_t &len) |
void * | pmt_uniform_vector_writable_elements (pmt_t v, size_t &len) |
uint8_t * | pmt_u8vector_writable_elements (pmt_t v, size_t &len) |
int8_t * | pmt_s8vector_writable_elements (pmt_t v, size_t &len) |
uint16_t * | pmt_u16vector_writable_elements (pmt_t v, size_t &len) |
int16_t * | pmt_s16vector_writable_elements (pmt_t v, size_t &len) |
uint32_t * | pmt_u32vector_writable_elements (pmt_t v, size_t &len) |
int32_t * | pmt_s32vector_writable_elements (pmt_t v, size_t &len) |
uint64_t * | pmt_u64vector_writable_elements (pmt_t v, size_t &len) |
int64_t * | pmt_s64vector_writable_elements (pmt_t v, size_t &len) |
float * | pmt_f32vector_writable_elements (pmt_t v, size_t &len) |
double * | pmt_f64vector_writable_elements (pmt_t v, size_t &len) |
std::complex< float > * | pmt_c32vector_writable_elements (pmt_t v, size_t &len) |
std::complex< double > * | pmt_c64vector_writable_elements (pmt_t v, size_t &len) |
bool | pmt_is_dict (pmt_t obj) |
Return true if obj is a dictionary. | |
pmt_t | pmt_make_dict () |
make an empty dictionary | |
void | pmt_dict_set (pmt_t dict, pmt_t key, pmt_t value) |
dict[key] = value | |
bool | pmt_dict_has_key (pmt_t dict, pmt_t key) |
Return true if key exists in dict . | |
pmt_t | pmt_dict_ref (pmt_t dict, pmt_t key, pmt_t not_found) |
If key exists in dict , return associated value; otherwise return not_found . | |
pmt_t | pmt_dict_items (pmt_t dict) |
Return list of (key . value) pairs. | |
pmt_t | pmt_dict_keys (pmt_t dict) |
Return list of keys. | |
pmt_t | pmt_dict_values (pmt_t dict) |
Return list of values. | |
bool | pmt_is_any (pmt_t obj) |
Return true if obj is an any. | |
pmt_t | pmt_make_any (const boost::any &any) |
make an any | |
boost::any | pmt_any_ref (pmt_t obj) |
Return underlying boost::any. | |
void | pmt_any_set (pmt_t obj, const boost::any &any) |
Store any in obj . | |
bool | pmt_eq (pmt_t x, pmt_t y) |
Return true if x and y are the same object; otherwise return false. | |
bool | pmt_eqv (pmt_t x, pmt_t y) |
Return true if x and y should normally be regarded as the same object, else false. | |
bool | pmt_equal (pmt_t x, pmt_t y) |
size_t | pmt_length (pmt_t v) |
Return the number of elements in v. | |
pmt_t | pmt_assq (pmt_t obj, pmt_t alist) |
Find the first pair in alist whose car field is obj and return that pair. | |
pmt_t | pmt_assv (pmt_t obj, pmt_t alist) |
Find the first pair in alist whose car field is obj and return that pair. | |
pmt_t | pmt_assoc (pmt_t obj, pmt_t alist) |
Find the first pair in alist whose car field is obj and return that pair. | |
pmt_t | pmt_map (pmt_t proc(pmt_t), pmt_t list) |
Apply proc element-wise to the elements of list and returns a list of the results, in order. | |
pmt_t | pmt_reverse (pmt_t list) |
reverse list . | |
pmt_t | pmt_reverse_x (pmt_t list) |
destructively reverse list . | |
static pmt_t | pmt_acons (pmt_t x, pmt_t y, pmt_t a) |
(acons x y a) == (cons (cons x y) a) | |
pmt_t | pmt_nth (size_t n, pmt_t list) |
locates nth element of list where the car is the 'zeroth' element. | |
pmt_t | pmt_nthcdr (size_t n, pmt_t list) |
returns the tail of list that would be obtained by calling cdr n times in succession. | |
pmt_t | pmt_memq (pmt_t obj, pmt_t list) |
Return the first sublist of list whose car is obj . If obj does not occur in list , then #f is returned. pmt_memq use pmt_eq to compare obj with the elements of list . | |
pmt_t | pmt_memv (pmt_t obj, pmt_t list) |
Return the first sublist of list whose car is obj . If obj does not occur in list , then #f is returned. pmt_memv use pmt_eqv to compare obj with the elements of list . | |
pmt_t | pmt_member (pmt_t obj, pmt_t list) |
Return the first sublist of list whose car is obj . If obj does not occur in list , then #f is returned. pmt_member use pmt_equal to compare obj with the elements of list . | |
bool | pmt_subsetp (pmt_t list1, pmt_t list2) |
Return true if every element of list1 appears in list2 , and false otherwise. Comparisons are done with pmt_eqv. | |
pmt_t | pmt_list1 (pmt_t x1) |
Return a list of length 1 containing x1 . | |
pmt_t | pmt_list2 (pmt_t x1, pmt_t x2) |
Return a list of length 2 containing x1 , x2 . | |
pmt_t | pmt_list3 (pmt_t x1, pmt_t x2, pmt_t x3) |
Return a list of length 3 containing x1 , x2 , x3 . | |
pmt_t | pmt_list4 (pmt_t x1, pmt_t x2, pmt_t x3, pmt_t x4) |
Return a list of length 4 containing x1 , x2 , x3 , x4 . | |
pmt_t | pmt_list5 (pmt_t x1, pmt_t x2, pmt_t x3, pmt_t x4, pmt_t x5) |
Return a list of length 5 containing x1 , x2 , x3 , x4 , x5 . | |
pmt_t | pmt_list6 (pmt_t x1, pmt_t x2, pmt_t x3, pmt_t x4, pmt_t x5, pmt_t x6) |
Return a list of length 6 containing x1 , x2 , x3 , x4 , x5 , x6 . | |
pmt_t | pmt_list_add (pmt_t list, pmt_t item) |
Return list with item added to it. | |
bool | pmt_is_eof_object (pmt_t obj) |
return true if obj is the EOF object, otherwise return false. | |
pmt_t | pmt_read (std::istream &port) |
void | pmt_write (pmt_t obj, std::ostream &port) |
std::string | pmt_write_string (pmt_t obj) |
std::ostream & | operator<< (std::ostream &os, pmt_t obj) |
bool | pmt_serialize (pmt_t obj, std::streambuf &sink) |
Write portable byte-serial representation of obj to sink . | |
pmt_t | pmt_deserialize (std::streambuf &source) |
Create obj from portable byte-serial representation. | |
void | pmt_dump_sizeof () |
Variables | |
const pmt_t | PMT_T |
const pmt_t | PMT_F |
const pmt_t | PMT_NIL |
const pmt_t | PMT_EOF |
typedef boost::shared_ptr<pmt_base> pmt_t |
typedef for shared pointer (transparent reference counting). See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
std::ostream& operator<< | ( | std::ostream & | os, |
pmt_t | obj | ||
) |
(acons x y a) == (cons (cons x y) a)
References pmt_cons().
boost::any pmt_any_ref | ( | pmt_t | obj | ) |
Return underlying boost::any.
void pmt_any_set | ( | pmt_t | obj, |
const boost::any & | any | ||
) |
Store any
in obj
.
Find the first pair in alist
whose car field is obj
and return that pair.
alist
(for "association list") must be a list of pairs. If no pair in alist
has obj
as its car then #f is returned. Uses pmt_equal to compare obj
with car fields of the pairs in alist
.
Find the first pair in alist
whose car field is obj
and return that pair.
alist
(for "association list") must be a list of pairs. If no pair in alist
has obj
as its car then #f is returned. Uses pmt_eq to compare obj
with car fields of the pairs in alist
.
Find the first pair in alist
whose car field is obj
and return that pair.
alist
(for "association list") must be a list of pairs. If no pair in alist
has obj
as its car then #f is returned. Uses pmt_eqv to compare obj
with car fields of the pairs in alist
.
const std::complex<float>* pmt_c32vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
std::complex<float> pmt_c32vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_c32vector_set | ( | pmt_t | v, |
size_t | k, | ||
std::complex< float > | x | ||
) |
std::complex<float>* pmt_c32vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const std::complex<double>* pmt_c64vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
std::complex<double> pmt_c64vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_c64vector_set | ( | pmt_t | v, |
size_t | k, | ||
std::complex< double > | x | ||
) |
std::complex<double>* pmt_c64vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
If pair
is a pair, return the car of the pair
, otherwise raise wrong_type.
If pair
is a pair, return the cdr of the pair
, otherwise raise wrong_type.
Return a newly allocated pair whose car is x
and whose cdr is y
.
Referenced by pmt_acons().
pmt_t pmt_deserialize | ( | std::streambuf & | source | ) |
Create obj from portable byte-serial representation.
If key
exists in dict
, return associated value; otherwise return not_found
.
void pmt_dump_sizeof | ( | ) |
Return true if x and y are the same object; otherwise return false.
pmt_equal recursively compares the contents of pairs and vectors, applying pmt_eqv on other objects such as numbers and symbols. pmt_equal may fail to terminate if its arguments are circular data structures.
Return true if x and y should normally be regarded as the same object, else false.
eqv returns true if: x and y are the same object. x and y are both #t or both #f. x and y are both symbols and their names are the same. x and y are both numbers, and are numerically equal. x and y are both the empty list (nil). x and y are pairs or vectors that denote same location in store.
const float* pmt_f32vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
float pmt_f32vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_f32vector_set | ( | pmt_t | v, |
size_t | k, | ||
float | x | ||
) |
float* pmt_f32vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const double* pmt_f64vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
double pmt_f64vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_f64vector_set | ( | pmt_t | v, |
size_t | k, | ||
double | x | ||
) |
double* pmt_f64vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
pmt_t pmt_from_double | ( | double | x | ) |
Return the pmt value that represents double x
.
pmt_t pmt_from_long | ( | long | x | ) |
Return the pmt value that represents the integer x
.
pmt_t pmt_init_c32vector | ( | size_t | k, |
const std::complex< float > * | data | ||
) |
pmt_t pmt_init_c64vector | ( | size_t | k, |
const std::complex< double > * | data | ||
) |
pmt_t pmt_init_f32vector | ( | size_t | k, |
const float * | data | ||
) |
pmt_t pmt_init_f64vector | ( | size_t | k, |
const double * | data | ||
) |
pmt_t pmt_init_s16vector | ( | size_t | k, |
const int16_t * | data | ||
) |
pmt_t pmt_init_s32vector | ( | size_t | k, |
const int32_t * | data | ||
) |
pmt_t pmt_init_s64vector | ( | size_t | k, |
const int64_t * | data | ||
) |
pmt_t pmt_init_s8vector | ( | size_t | k, |
const int8_t * | data | ||
) |
pmt_t pmt_init_u16vector | ( | size_t | k, |
const uint16_t * | data | ||
) |
pmt_t pmt_init_u32vector | ( | size_t | k, |
const uint32_t * | data | ||
) |
pmt_t pmt_init_u64vector | ( | size_t | k, |
const uint64_t * | data | ||
) |
pmt_t pmt_init_u8vector | ( | size_t | k, |
const uint8_t * | data | ||
) |
pmt_t pmt_intern | ( | const std::string & | s | ) |
Alias for pmt_string_to_symbol.
true if x
is any kind of uniform numeric vector
------------------------------------------------------------------------ Uniform Numeric Vectors
A uniform numeric vector is a vector whose elements are all of single numeric type. pmt offers uniform numeric vectors for signed and unsigned 8-bit, 16-bit, 32-bit, and 64-bit integers, two sizes of floating point values, and complex floating-point numbers of these two sizes. Indexing is zero based.
The names of the functions include these tags in their names:
u8 unsigned 8-bit integers s8 signed 8-bit integers u16 unsigned 16-bit integers s16 signed 16-bit integers u32 unsigned 32-bit integers s32 signed 32-bit integers u64 unsigned 64-bit integers s64 signed 64-bit integers f32 the C++ type float f64 the C++ type double c32 the C++ type complex<float> c64 the C++ type complex<double> ------------------------------------------------------------------------
size_t pmt_length | ( | pmt_t | v | ) |
Return the number of elements in v.
Return a list of length 4 containing x1
, x2
, x3
, x4
.
Return a list of length 5 containing x1
, x2
, x3
, x4
, x5
.
Return a list of length 6 containing x1
, x2
, x3
, x4
, x5
, x6
.
pmt_t pmt_make_any | ( | const boost::any & | any | ) |
make an any
pmt_t pmt_make_c32vector | ( | size_t | k, |
std::complex< float > | fill | ||
) |
pmt_t pmt_make_c64vector | ( | size_t | k, |
std::complex< double > | fill | ||
) |
pmt_t pmt_make_dict | ( | ) |
make an empty dictionary
pmt_t pmt_make_f32vector | ( | size_t | k, |
float | fill | ||
) |
pmt_t pmt_make_f64vector | ( | size_t | k, |
double | fill | ||
) |
pmt_t pmt_make_rectangular | ( | double | re, |
double | im | ||
) |
Return a complex number constructed of the given real and imaginary parts.
pmt_t pmt_make_s16vector | ( | size_t | k, |
int16_t | fill | ||
) |
pmt_t pmt_make_s32vector | ( | size_t | k, |
int32_t | fill | ||
) |
pmt_t pmt_make_s64vector | ( | size_t | k, |
int64_t | fill | ||
) |
pmt_t pmt_make_s8vector | ( | size_t | k, |
int8_t | fill | ||
) |
pmt_t pmt_make_u16vector | ( | size_t | k, |
uint16_t | fill | ||
) |
pmt_t pmt_make_u32vector | ( | size_t | k, |
uint32_t | fill | ||
) |
pmt_t pmt_make_u64vector | ( | size_t | k, |
uint64_t | fill | ||
) |
pmt_t pmt_make_u8vector | ( | size_t | k, |
uint8_t | fill | ||
) |
Make a vector of length k
, with initial values set to fill
.
Apply proc
element-wise to the elements of list and returns a list of the results, in order.
list
must be a list. The dynamic order in which proc
is applied to the elements of list
is unspecified.
Return the first sublist of list
whose car is obj
. If obj
does not occur in list
, then #f is returned. pmt_member use pmt_equal to compare obj
with the elements of list
.
Return the first sublist of list
whose car is obj
. If obj
does not occur in list
, then #f is returned. pmt_memq use pmt_eq to compare obj
with the elements of list
.
Return the first sublist of list
whose car is obj
. If obj
does not occur in list
, then #f is returned. pmt_memv use pmt_eqv to compare obj
with the elements of list
.
locates nth
element of
list where the car is the 'zeroth' element.
returns the tail of list
that would be obtained by calling cdr n
times in succession.
pmt_t pmt_read | ( | std::istream & | port | ) |
read converts external representations of pmt objects into the objects themselves. Read returns the next object parsable from the given input port, updating port to point to the first character past the end of the external representation of the object.
If an end of file is encountered in the input before any characters are found that can begin an object, then an end of file object is returned. The port remains open, and further attempts to read will also return an end of file object. If an end of file is encountered after the beginning of an object's external representation, but the external representation is incomplete and therefore not parsable, an error is signaled.
const int16_t* pmt_s16vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
int16_t pmt_s16vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_s16vector_set | ( | pmt_t | v, |
size_t | k, | ||
int16_t | x | ||
) |
int16_t* pmt_s16vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const int32_t* pmt_s32vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
int32_t pmt_s32vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_s32vector_set | ( | pmt_t | v, |
size_t | k, | ||
int32_t | x | ||
) |
int32_t* pmt_s32vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const int64_t* pmt_s64vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
int64_t pmt_s64vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_s64vector_set | ( | pmt_t | v, |
size_t | k, | ||
int64_t | x | ||
) |
int64_t* pmt_s64vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const int8_t* pmt_s8vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
int8_t pmt_s8vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_s8vector_set | ( | pmt_t | v, |
size_t | k, | ||
int8_t | x | ||
) |
int8_t* pmt_s8vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
Write portable byte-serial representation of obj
to sink
.
pmt_t pmt_string_to_symbol | ( | const std::string & | s | ) |
Return the symbol whose name is s
.
Return true if every element of list1
appears in list2
, and false otherwise. Comparisons are done with pmt_eqv.
const std::string pmt_symbol_to_string | ( | pmt_t | sym | ) |
If is
a symbol, return the name of the symbol as a string. Otherwise, raise the wrong_type exception.
std::complex<double> pmt_to_complex | ( | pmt_t | z | ) |
If z
is complex, real or integer, return the closest complex<double>. Otherwise, raise the wrong_type exception.
double pmt_to_double | ( | pmt_t | x | ) |
Convert pmt to double if possible.
Returns the number closest to val
that is representable as a double. The argument val
must be a real or integer, otherwise a wrong_type exception is raised.
long pmt_to_long | ( | pmt_t | x | ) |
Convert pmt to long if possible.
When x
represents an exact integer that fits in a long, return that integer. Else raise an exception, either wrong_type when x is not an exact integer, or out_of_range when it doesn't fit.
const uint16_t* pmt_u16vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
uint16_t pmt_u16vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_u16vector_set | ( | pmt_t | v, |
size_t | k, | ||
uint16_t | x | ||
) |
uint16_t* pmt_u16vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const uint32_t* pmt_u32vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
uint32_t pmt_u32vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_u32vector_set | ( | pmt_t | v, |
size_t | k, | ||
uint32_t | x | ||
) |
uint32_t* pmt_u32vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const uint64_t* pmt_u64vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
uint64_t pmt_u64vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_u64vector_set | ( | pmt_t | v, |
size_t | k, | ||
uint64_t | x | ||
) |
uint64_t* pmt_u64vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const uint8_t* pmt_u8vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
uint8_t pmt_u8vector_ref | ( | pmt_t | v, |
size_t | k | ||
) |
void pmt_u8vector_set | ( | pmt_t | v, |
size_t | k, | ||
uint8_t | x | ||
) |
uint8_t* pmt_u8vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
const void* pmt_uniform_vector_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
void* pmt_uniform_vector_writable_elements | ( | pmt_t | v, |
size_t & | len | ||
) |
Return the contents of position k
of vector
. k
must be a valid index of vector
.
void pmt_write | ( | pmt_t | obj, |
std::ostream & | port | ||
) |
Write a written representation of obj
to the given port
.
std::string pmt_write_string | ( | pmt_t | obj | ) |
Return a string representation of obj
. This is the same output as would be generated by pmt_write.