File: uint32vector.h

package info (click to toggle)
librra 0.14-1.2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,156 kB
  • sloc: ansic: 12,769; sh: 10,454; makefile: 181
file content (37 lines) | stat: -rw-r--r-- 878 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* $Id: uint32vector.h 1476 2003-12-21 16:30:32Z twogood $ */
#ifndef __uint32vector_h__
#define __uint32vector_h__

#include <synce.h>

struct _RRA_Uint32Vector
{
  uint32_t* items;
  size_t used;
  size_t size;
};

typedef struct _RRA_Uint32Vector RRA_Uint32Vector;

/** Create a new Uint32Vector */
RRA_Uint32Vector* rra_uint32vector_new();

/** Destroy RRA_Uint32Vector object */
void rra_uint32vector_destroy(RRA_Uint32Vector* v, bool free_items);

/** Add an item to vector */
RRA_Uint32Vector* rra_uint32vector_add(RRA_Uint32Vector* v, uint32_t value);

/** Add many items to vector */
RRA_Uint32Vector* rra_uint32vector_add_many(
    RRA_Uint32Vector* v, 
    uint32_t* values, 
    size_t count);

/** Sort vector */
void rra_uint32vector_sort(RRA_Uint32Vector* v);

/** Dump vector contents with synce_log() */
void rra_uint32vector_dump(RRA_Uint32Vector* v);

#endif