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

obstring Private Interface More...

#include "../obstring.h"

Go to the source code of this file.

Classes

struct  obstring_struct
 obstring internal structure, encapsulating all data needed for an instance of obstring More...
 

Functions

obstringobstring_create_default (void)
 Default constructor for obstring. More...
 
ob_hash_t obstring_hash (const obj *to_hash)
 Hash function for obstring. More...
 
int8_t obstring_compare (const obj *a, const obj *b)
 Compares two instances of obstring. More...
 
void obstring_display (const obj *str)
 Display function for an instance of obstring. More...
 
void obstring_destroy (obj *to_dealloc)
 Destructor for obstring. More...
 

Detailed Description

obstring Private Interface

Author
theck

Function Documentation

int8_t obstring_compare ( const obj a,
const obj b 
)

Compares two instances of obstring.

Parameters
aA non-NULL obj pointer to type obstring
bA non-NULL obj pointer to type obstring
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
obstring* obstring_create_default ( void  )

Default constructor for obstring.

Returns
An instance of class obstring
Warning
All public constructors should call this constructor and intialize individual members as needed, so that all base data is initialized properly.
void obstring_destroy ( obj to_dealloc)

Destructor for obstring.

Parameters
to_deallocAn obj pointer to an instance of obstring with reference count of 0
Warning
Do not call manually, release will call automatically when the instances reference count drops to 0!
void obstring_display ( const obj str)

Display function for an instance of obstring.

Parameters
strA non-NULL obj pointer to type obstring
ob_hash_t obstring_hash ( const obj to_hash)

Hash function for obstring.

Parameters
to_hashAn obj pointer to an instance of obstring
Returns
Key value (hash) for the given obj pointer to a obstring