Arbiter
Dependency manager library that supports decentralization
Public Attributes | List of all members
ArbiterUserValue Struct Reference

Represents an arbitrary value type that can be associated with Arbiter data types and functionality. More...

Collaboration diagram for ArbiterUserValue:
[legend]

Public Attributes

char *(* createDescription )(const void *data)
 An operation to convert this data object to a string. More...
 
void * data
 The underlying data object. More...
 
void(* destructor )(void *data)
 A cleanup function to call when the ArbiterUserValue is done being used. More...
 
bool(* equalTo )(const void *first, const void *second)
 An equality operation over two data objects. More...
 
size_t(* hash )(const void *first)
 Generates a hash of the data object. More...
 
bool(* lessThan )(const void *first, const void *second)
 Returns whether first is less than (should be ordered before) second. More...
 

Detailed Description

Represents an arbitrary value type that can be associated with Arbiter data types and functionality.

For example, ArbiterProjectIdentifiers are defined by providing a user value type.

Definition at line 18 of file Value.h.

Member Data Documentation

§ createDescription

char*(* ArbiterUserValue::createDescription) (const void *data)

An operation to convert this data object to a string.

The returned value must be dynamically allocated and support being destroyed with free().

This may be NULL.

Definition at line 57 of file Value.h.

§ data

void* ArbiterUserValue::data

The underlying data object.

This object should be considered to be owned by Arbiter as soon as the ArbiterUserValue is passed into any API. It will eventually be cleaned up by the library through invocation of the provided destructor.

Definition at line 27 of file Value.h.

§ destructor

void(* ArbiterUserValue::destructor) (void *data)

A cleanup function to call when the ArbiterUserValue is done being used.

This may be NULL.

Definition at line 64 of file Value.h.

§ equalTo

bool(* ArbiterUserValue::equalTo) (const void *first, const void *second)

An equality operation over two data objects.

This must not be NULL.

Definition at line 34 of file Value.h.

§ hash

size_t(* ArbiterUserValue::hash) (const void *first)

Generates a hash of the data object.

The hash does not need to be cryptographically secure.

This must not be NULL.

Definition at line 49 of file Value.h.

§ lessThan

bool(* ArbiterUserValue::lessThan) (const void *first, const void *second)

Returns whether first is less than (should be ordered before) second.

This must not be NULL.

Definition at line 41 of file Value.h.


The documentation for this struct was generated from the following file: