### Interface

# Gcr Comparable

#### Description [src]

    interface Gcr.Comparable : GObject.Object

An interface for comparing objects.

#### Prerequisite

In order to implement Comparable, your type must inherit from`GObject`.

#### Implementations

- GcrPkcs11Certificate
- GcrSimpleCertificate

#### Functions

###### gcr_comparable_memcmp

Compare two blocks of memory. The return value can be used to sort the blocks of memory.

#### Instance methods

###### gcr_comparable_compare

Compare whether two objects represent the same thing. The return value can also be used to sort the objects.

#### Interface structure

    struct GcrComparableIface {
      GTypeInterface parent;
      gint (* compare) (
        GcrComparable* self,
        GcrComparable* other
      );

    }

The interface to implement for `GcrComparable`.

###### Interface members

`parent`

    GTypeInterface

| Type interface.

`compare`

    gint (* compare) (
        GcrComparable* self,
        GcrComparable* other
      )

| Compare whether tow objects represent the same thing.

#### Virtual methods

###### Gcr.Comparable.compare

Compare whether two objects represent the same thing. The return value can also be used to sort the objects.