Mir 1.0
Mir application programming interface

Functions

mirkl_error_tmir_rational_instance_create_str (mirkl_object_t **obj, char *str, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_rational_instance_create_mpq (mirkl_object_t **obj, mpq_t val, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_rational_instance_create_int (mirkl_object_t **obj, mirkl_int64_t num, mirkl_int64_t den, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_rational_instance_create_mpz (mirkl_object_t **obj, mpz_t val, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_rational_instance_create_mpz_split (mirkl_object_t **obj, mpz_t num, mpz_t den, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_rational_set_data_str (mirkl_object_t *obj, char *str)
 
mirkl_error_tmir_rational_set_data_mpq (mirkl_object_t *obj, mpq_t val)
 
mirkl_error_tmir_rational_set_data_int (mirkl_object_t *obj, mirkl_int64_t num, mirkl_int64_t den)
 
mirkl_error_tmir_rational_set_data_mpz (mirkl_object_t *obj, mpz_t val)
 
mirkl_error_tmir_rational_set_data_mpz_split (mirkl_object_t *obj, mpz_t num, mpz_t den)
 

Variables

mirkl_object_t * MirRationalClass
 Rational class.
 

Detailed Description

Function Documentation

◆ mir_rational_instance_create_int()

mirkl_error_t * mir_rational_instance_create_int ( mirkl_object_t **  obj,
mirkl_int64_t  num,
mirkl_int64_t  den,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of Rational object.

Parameters
[out]objReference to the created object.
numnumerator value for initialization.
dendenominator value for initialization.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_rational_instance_create_mpq()

mirkl_error_t * mir_rational_instance_create_mpq ( mirkl_object_t **  obj,
mpq_t  val,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of Rational object.

Parameters
[out]objReference to the created object.
valMPQ value for initialization.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_rational_instance_create_mpz()

mirkl_error_t * mir_rational_instance_create_mpz ( mirkl_object_t **  obj,
mpz_t  val,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of Rational object from one mpz_t value.

Parameters
[out]objReference to the created object.
valMPZ value for initialization.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_rational_instance_create_mpz_split()

mirkl_error_t * mir_rational_instance_create_mpz_split ( mirkl_object_t **  obj,
mpz_t  num,
mpz_t  den,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of Rational object from two mpz_t values.

Parameters
[out]objReference to the created object.
numMPZ numerator value for initialization.
denMPZ denominator value for initialization.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_rational_instance_create_str()

mirkl_error_t * mir_rational_instance_create_str ( mirkl_object_t **  obj,
char *  str,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of Rational object.

Parameters
[out]objReference to the created object.
strString with value for initialization.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_rational_set_data_int()

mirkl_error_t * mir_rational_set_data_int ( mirkl_object_t *  obj,
mirkl_int64_t  num,
mirkl_int64_t  den 
)

Sets the value from int64 type variables.

Parameters
objReference to the object.
numnumerator value for initialization.
dendenominator value for initialization.

◆ mir_rational_set_data_mpq()

mirkl_error_t * mir_rational_set_data_mpq ( mirkl_object_t *  obj,
mpq_t  val 
)

Sets the value from GMPs mpq_t type variable.

Parameters
objReference to the object.
valMPQ value to set.

◆ mir_rational_set_data_mpz()

mirkl_error_t * mir_rational_set_data_mpz ( mirkl_object_t *  obj,
mpz_t  val 
)

Sets the value from one mpz_t type variable.

Parameters
objReference to the object.
valvalue for initialization.

◆ mir_rational_set_data_mpz_split()

mirkl_error_t * mir_rational_set_data_mpz_split ( mirkl_object_t *  obj,
mpz_t  num,
mpz_t  den 
)

Sets the value from two mpz_t type variables.

Parameters
objReference to the object.
numnumerator value for initialization.
dendenominator value for initialization.

◆ mir_rational_set_data_str()

mirkl_error_t * mir_rational_set_data_str ( mirkl_object_t *  obj,
char *  str 
)

Setting value for Rational object.

Parameters
objReference to the object.
strString with value to set.