|  |  |  | Libcroco Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
struct CRNum; CRNum * cr_num_new (void); CRNum * cr_num_new_with_val (gdouble a_val,enum CRNumType a_type); CRNum * cr_num_dup (CRNum const *a_this); guchar * cr_num_to_string (CRNum const *a_this); enum CRStatus cr_num_copy (CRNum *a_dest,CRNum const *a_src); enum CRStatus cr_num_set (CRNum *a_this,gdouble a_val,enum CRNumType a_type); gboolean cr_num_is_fixed_length (CRNum const *a_this); void cr_num_destroy (CRNum *a_this);
CRNum * cr_num_new_with_val (gdouble a_val,enum CRNumType a_type);
A constructor of CRNum.
| 
 | the numerical value of the number. | 
| 
 | the type of number. | 
| Returns : | the newly built instance of CRNum or NULL if an error arises. | 
CRNum *             cr_num_dup                          (CRNum const *a_this);
Duplicates an instance of CRNum
| 
 | the instance of CRNum to duplicate. | 
| Returns : | the newly created (duplicated) instance of CRNum.
Must be freed by cr_num_destroy(). | 
enum CRStatus cr_num_copy (CRNum *a_dest,CRNum const *a_src);
Copies an instance of CRNum.
| 
 | the destination of the copy. Must be non NULL | 
| 
 | the instance of CRNum to copy. Must be non NULL. | 
| Returns : | CR_OK upon successful completion, an error code otherwise. | 
gboolean            cr_num_is_fixed_length              (CRNum const *a_this);
Tests if the current instance of CRNum is a fixed length value or not. Typically a fixed length value is anything from NUM_LENGTH_EM to NUM_LENGTH_PC. See the definition of CRNumType to see what we mean.