taskrambler  0.1.9
Web server and task management solution.
hashable.h File Reference
#include "class.h"
+ Include dependency graph for hashable.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  i_Hashable
 

Typedefs

typedef unsigned long(* fptr_hashableGetHash) (void *)
 
typedef void(* fptr_hashableHandleDouble) (void *, void *)
 

Functions

unsigned long hashableGetHash (void *)
 
void hashableHandleDouble (void *, void *)
 

Variables

const struct interface i_Hashable
 

Detailed Description

The logger interface.

Author
Georg Hopp

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file hashable.h.


Data Structure Documentation

struct i_Hashable

Definition at line 34 of file hashable.h.

+ Collaboration diagram for i_Hashable:
Data Fields
const struct interface *const _
fptr_hashableGetHash getHash
fptr_hashableHandleDouble handleDouble

Typedef Documentation

typedef unsigned long(* fptr_hashableGetHash) (void *)

Definition at line 29 of file hashable.h.

typedef void(* fptr_hashableHandleDouble) (void *, void *)

Definition at line 30 of file hashable.h.

Function Documentation

unsigned long hashableGetHash ( void *  )

Definition at line 36 of file hashable.c.

References i_Hashable::getHash, HAS_PARENT, and IFACE_GET.

Referenced by hashAddComp(), hashDeleteComp(), and hashGetComp().

37 {
38  unsigned long ret;
39 
40  //RETCALL(hashable, Hashable, getHash, ret);
41  do {
42  struct i_Hashable * iface;
43  //_CALL(GET_CLASS(hashable), Hashable, getHash);
44  do {
45  class_ptr class = GET_CLASS(hashable);
46  iface = (struct i_Hashable *)IFACE_GET(class, &i_Hashable);
47  while ((NULL == iface || NULL == iface->getHash) && HAS_PARENT(class)) {
48  class = class->parent;
49  iface = (struct i_Hashable *)IFACE_GET(class, &i_Hashable);
50  }
51  assert(NULL != iface->getHash);
52  } while(0);
53 
54  ret = iface->getHash(hashable);
55  } while(0);
56 
57 
58  return ret;
59 }
class_ptr parent
Definition: class/class.h:135
#define IFACE_GET(class, iface)
Definition: class/class.h:85
#define HAS_PARENT(class)
Definition: class/class.h:86

+ Here is the caller graph for this function:

void hashableHandleDouble ( void *  ,
void *   
)

Definition at line 62 of file hashable.c.

References CALL, and i_Hashable::handleDouble.

Referenced by hashAdd().

63 {
64  CALL(hashable, Hashable, handleDouble, new_hashable);
65 }
#define CALL(object, _iface, method,...)
Definition: class/class.h:106
fptr_hashableHandleDouble handleDouble
Definition: hashable.h:37

+ Here is the caller graph for this function:

Variable Documentation

const struct interface i_Hashable

Definition at line 30 of file hashable.c.