FoDatatype

FoDatatype

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── FoObject
        ╰── FoDatatype
            ├── FoBoolean
            ├── FoChar
            ├── FoColor
            ├── FoEnum
            ├── FoExpression
            ├── FoId
            ├── FoInteger
            ├── FoKeep
            ├── FoLengthBpIpD
            ├── FoLengthCond
            ├── FoLength
            ├── FoLengthRange
            ├── FoName
            ├── FoNumber
            ├── FoNumeric
            ├── FoPercentage
            ├── FoSpace
            ├── FoString
            ├── FoUnknown
            ╰── FoUriSpecification

Description

Functions

fo_datatype_error_quark ()

GQuark
fo_datatype_error_quark (void);

Get the error quark for FoDatatype.

If the quark does not yet exist, create it.

Returns

Quark associated with FoDatatype errors


fo_datatype_new ()

FoDatatype *
fo_datatype_new (void);

Creates a new FoDatatype initialized to default value.

Returns

the new FoDatatype


fo_datatype_copy ()

FoDatatype *
fo_datatype_copy (FoDatatype *datatype);

Makes a copy of datatype

Parameters

datatype

FoDatatype to be copied

 

Returns

Copy of datatype


fo_datatype_get_condity_discard ()

FoDatatype *
fo_datatype_get_condity_discard (void);

Returns

The FoDatatype value for conditionality="discard"


fo_datatype_get_condity_retain ()

FoDatatype *
fo_datatype_get_condity_retain (void);

Returns

The FoDatatype value for conditionality="retain"


fo_datatype_add ()

FoDatatype *
fo_datatype_add (FoDatatype *arg1,
                 FoDatatype *arg2);

Find addition of the values of arg1 and arg2 . arg1 and arg2 are unchanged.

The type of the return value depends on the types of arg1 and arg2 :

fo_datatype_add (FoInteger, FoInteger) --> FoInteger fo_datatype_add (FoInteger, FoNumber) --> FoNumber fo_datatype_add (FoNumber, FoInteger) --> FoNumber fo_datatype_add (FoNumber, FoNumber) --> FoNumber fo_datatype_add (FoLength, FoLength) --> FoLength fo_datatype_add (FoPercentage, FoPercentage) --> FoPercentage

Parameters

arg1

FoDatatype.

 

arg2

FoDatatype.

 

Returns

FoDatatype with value that is equal to addition of values of arg1 and arg2 , or FoError if cannot compute addition of arg1 and arg2 . The type of the return value depends on the types of arg1 and arg2 .


fo_datatype_sub ()

FoDatatype *
fo_datatype_sub (FoDatatype *arg1,
                 FoDatatype *arg2);

Find subtraction of the value of arg2 from the value of arg1 . arg1 and arg2 are unchanged.

The type of the return value depends on the types of arg1 and arg2 :

fo_datatype_sub (FoInteger, FoInteger) --> FoInteger fo_datatype_sub (FoInteger, FoNumber) --> FoNumber fo_datatype_sub (FoNumber, FoInteger) --> FoNumber fo_datatype_sub (FoNumber, FoNumber) --> FoNumber fo_datatype_sub (FoLength, FoLength) --> FoLength fo_datatype_sub (FoPercentage, FoPercentage) --> FoPercentage

Parameters

arg1

FoDatatype.

 

arg2

FoDatatype.

 

Returns

FoDatatype with value that is equal to subtraction of the value of arg2 from the value of arg1 , or FoError if cannot compute subisor of arg1 and arg2 . The type of the return value depends on the types of arg1 and arg2 .


fo_datatype_mul ()

FoDatatype *
fo_datatype_mul (FoDatatype *arg1,
                 FoDatatype *arg2);

Find multiple of values of arg1 and arg2 . arg1 and arg2 are unchanged.

The type of the return value depends on the types of arg1 and arg2 :

fo_datatype_mul (FoInteger, FoInteger) --> FoInteger fo_datatype_mul (FoInteger, FoNumber) --> FoNumber fo_datatype_mul (FoInteger, FoLength) --> FoLength fo_datatype_mul (FoInteger, FoPercentage) --> FoInteger fo_datatype_mul (FoNumber, FoInteger) --> FoNumber fo_datatype_mul (FoNumber, FoNumber) --> FoNumber fo_datatype_mul (FoNumber, FoLength) --> FoLength fo_datatype_mul (FoNumber, FoPercentage) --> FoNumber fo_datatype_mul (FoLength, FoInteger) --> FoLength fo_datatype_mul (FoLength, FoNumber) --> FoLength fo_datatype_mul (FoLength, FoPercentage) --> FoLength fo_datatype_mul (FoPercentage, FoInteger) --> FoInteger fo_datatype_mul (FoPercentage, FoNumber) --> FoNumber fo_datatype_mul (FoPercentage, FoLength) --> FoLength fo_datatype_mul (FoPercentage, FoPercentage) --> FoPercentage

Parameters

arg1

FoDatatype.

 

arg2

FoDatatype.

 

Returns

FoDatatype with value that is equal to mulisor of values of arg1 and arg2 , or FoError if cannot compute mulisor of arg1 and arg2 . The type of the return value depends on the types of arg1 and arg2 .


fo_datatype_div ()

FoDatatype *
fo_datatype_div (FoDatatype *arg1,
                 FoDatatype *arg2);

Find divisor of values of arg1 and arg2 . arg1 and arg2 are unchanged.

The type of the return value depends on the types of arg1 and arg2 :

fo_datatype_div (FoInteger, FoInteger) --> FoInteger fo_datatype_div (FoInteger, FoNumber) --> FoNumber fo_datatype_div (FoNumber, FoInteger) --> FoNumber fo_datatype_div (FoNumber, FoNumber) --> FoNumber fo_datatype_div (FoLength, FoLength) --> FoNumber fo_datatype_div (FoLength, FoInteger) --> FoLength fo_datatype_div (FoLength, FoNumber) --> FoLength fo_datatype_div (FoLength, FoPercentage) --> FoLength fo_datatype_div (FoPercentage, FoPercentage) --> FoPercentage fo_datatype_div (FoPercentage, FoNumber) --> FoPercentage fo_datatype_div (FoPercentage, FoInteger) --> FoPercentage

Parameters

arg1

FoDatatype.

 

arg2

FoDatatype.

 

Returns

FoDatatype with value that is equal to divisor of values of arg1 and arg2 , or FoError if cannot compute divisor of arg1 and arg2 . The type of the return value depends on the types of arg1 and arg2 .


fo_datatype_mod ()

FoDatatype *
fo_datatype_mod (FoDatatype *arg1,
                 FoDatatype *arg2);

Find modulus of values of arg1 and arg2 . arg1 and arg2 are unchanged.

The type of the return value depends on the types of arg1 and arg2 :

fo_datatype_mod (FoInteger, FoInteger) --> FoInteger fo_datatype_mod (FoInteger, FoNumber) --> FoNumber fo_datatype_mod (FoNumber, FoInteger) --> FoNumber fo_datatype_mod (FoNumber, FoNumber) --> FoNumber fo_datatype_mod (FoLength, FoLength) --> FoNumber fo_datatype_mod (FoLength, FoInteger) --> FoNumber fo_datatype_mod (FoLength, FoNumber) --> FoNumber fo_datatype_mod (FoLength, FoPercentage) --> FoNumber fo_datatype_mod (FoPercentage, FoPercentage) --> FoNumber fo_datatype_mod (FoPercentage, FoNumber) --> FoPercentage fo_datatype_mod (FoPercentage, FoInteger) --> FoPercentage

Parameters

arg1

FoDatatype.

 

arg2

FoDatatype.

 

Returns

FoDatatype with value that is equal to modulus of values of arg1 and arg2 , or FoError if cannot compute modulus of arg1 and arg2 . The type of the return value depends on the types of arg1 and arg2 .


fo_datatype_max ()

FoDatatype *
fo_datatype_max (FoDatatype *arg1,
                 FoDatatype *arg2);

Find maximum of values of arg1 and arg2 . arg1 and arg2 are unchanged.

Parameters

arg1

Instance of child type of FoDatatype.

 

arg2

FoDatatype of same child type as arg1 .

 

Returns

FoDatatype of same type as arg1 and arg2 and with value that is equal to maximum of values of arg1 and arg2 , or FoError if cannot compute maximum of arg1 and arg2 .


fo_datatype_min ()

FoDatatype *
fo_datatype_min (FoDatatype *arg1,
                 FoDatatype *arg2);

Find minimum of values of arg1 and arg2 . arg1 and arg2 are unchanged.

Parameters

arg1

Instance of child type of FoDatatype.

 

arg2

FoDatatype of same child type as arg1 .

 

Returns

FoDatatype of same type as arg1 and arg2 and with value that is equal to minimum of values of arg1 and arg2 , or FoError if cannot compute minimum of arg1 and arg2 .


fo_datatype_floor ()

FoDatatype *
fo_datatype_floor (FoDatatype *arg);

Computed floor value of value of arg . arg is unchanged.

Parameters

arg

FoDatatype.

 

Returns

FoDatatype of same type as arg and with value that is floor value of value of arg , or FoError if cannot compute floor of arg .


fo_datatype_ceiling ()

FoDatatype *
fo_datatype_ceiling (FoDatatype *arg);

Computed ceiling value of value of arg . arg is unchanged.

Parameters

arg

FoDatatype.

 

Returns

FoDatatype of same type as arg and with value that is ceiling value of value of arg , or FoError if cannot compute ceiling of arg .


fo_datatype_abs ()

FoDatatype *
fo_datatype_abs (FoDatatype *arg);

Compute absolute value of value of arg . arg is unchanged.

Parameters

arg

FoDatatype.

 

Returns

FoDatatype of same type as arg and with value that is absolute value of value of arg , or FoError if cannot compute absolute value of arg .


fo_datatype_round ()

FoDatatype *
fo_datatype_round (FoDatatype *arg);

Computed rounded value of value of arg . arg is unchanged.

Parameters

arg

FoDatatype to round.

 

Returns

FoDatatype of same type as arg and with value that is rounded value of value of arg , of FoError is cannot round arg .


fo_datatype_negate ()

FoDatatype *
fo_datatype_negate (FoDatatype *arg);

Compute negated value of value of arg . arg is unchanged.

Parameters

arg

FoDatatype to negate.

 

Returns

FoDatatype of same type as arg and negated value, or FoError if cannot compute negated value of arg .

Types and Values

FoDatatype

typedef struct _FoDatatype FoDatatype;


FoDatatypeClass

typedef struct _FoDatatypeClass FoDatatypeClass;


FO_DATATYPE_ERROR

#define FO_DATATYPE_ERROR fo_datatype_error_quark ()


enum FoDatatypeError

Members

FO_DATATYPE_ERROR_WRONG_DATATYPE

   

FO_DATATYPE_ERROR_ADD

   

FO_DATATYPE_ERROR_SUB

   

FO_DATATYPE_ERROR_MUL

   

FO_DATATYPE_ERROR_DIV

   

FO_DATATYPE_ERROR_MOD

   

FO_DATATYPE_ERROR_MAX

   

FO_DATATYPE_ERROR_MIN

   

FO_DATATYPE_ERROR_FLOOR

   

FO_DATATYPE_ERROR_ROUND

   

FO_DATATYPE_ERROR_CEILING

   

FO_DATATYPE_ERROR_ABS

   

FO_DATATYPE_ERROR_NEGATE