offbrand
A collection of generic, reference counted datastructures in C for C
 All Classes Files Functions Variables Typedefs Macros Groups
Functions
obtest.c File Reference

obtest Method Implementation More...

#include "../../include/obtest.h"
#include "../../include/private/obtest_private.h"

Functions

obtestobtest_new (uint32_t id)
 Constructor, creates an instance of obtest with a specified id. More...
 
uint32_t obtest_id (obtest *a)
 Returns the id of an obtest instance. More...
 
ob_hash_t obtest_hash (const obj *to_hash)
 Hash function for obtest. More...
 
int8_t obtest_compare (const obj *a, const obj *b)
 Compares two instances of obtest. More...
 
void obtest_display (const obj *test)
 Display function for an instance of obtest. More...
 
void obtest_destroy (obj *to_dealloc)
 Destructor for obtest. More...
 

Detailed Description

obtest Method Implementation

Author
theck

Function Documentation

int8_t obtest_compare ( const obj a,
const obj b 
)

Compares two instances of obtest.

Parameters
aA non-NULL obj pointer to type obtest
bA non-NULL obj pointer to type obtest
Return values
OB_LESS_THANobj a is less than b
OB_GREATER_THANobj a is equivalent to b
OB_EQUAL_TOobj a is greater than b
void obtest_destroy ( obj to_dealloc)

Destructor for obtest.

Parameters
to_deallocAn obj pointer to an instance of obtest with reference count of 0
Warning
Do not call manually, release will call automatically when instance reference count drops to 0!
void obtest_display ( const obj test)

Display function for an instance of obtest.

Parameters
testA non-NULL obj pointer to type obtest
ob_hash_t obtest_hash ( const obj to_hash)

Hash function for obtest.

Parameters
to_hashAn obj pointer to an instance of OBString
Returns
Key value (hash) for the given obj pointer to a OBString
uint32_t obtest_id ( obtest a)

Returns the id of an obtest instance.

Parameters
aPointer to an instance of obtest
Returns
id value of the obtest argument
obtest* obtest_new ( uint32_t  id)

Constructor, creates an instance of obtest with a specified id.

Parameters
idInteger id for the created obtest
Returns
Instance of obtest with id as given by parameter