indexbuf.h File Reference

Expandable buffer of non-negative values. More...

Go to the source code of this file.

Data Structures

struct  ccn_indexbuf

Functions

struct ccn_indexbufccn_indexbuf_create (void)
 Create a new indexbuf.
void ccn_indexbuf_destroy (struct ccn_indexbuf **cbp)
 Deallocate indexbuf.
size_t * ccn_indexbuf_reserve (struct ccn_indexbuf *c, size_t n)
 Expand buffer as necessary to hold at least n more values.
int ccn_indexbuf_append (struct ccn_indexbuf *c, const size_t *p, size_t n)
int ccn_indexbuf_append_element (struct ccn_indexbuf *c, size_t v)
int ccn_indexbuf_member (struct ccn_indexbuf *x, size_t val)
void ccn_indexbuf_remove_element (struct ccn_indexbuf *x, size_t val)
int ccn_indexbuf_set_insert (struct ccn_indexbuf *x, size_t val)
int ccn_indexbuf_remove_first_match (struct ccn_indexbuf *x, size_t val)
void ccn_indexbuf_move_to_end (struct ccn_indexbuf *x, size_t val)
void ccn_indexbuf_move_to_front (struct ccn_indexbuf *x, size_t val)

Detailed Description

Expandable buffer of non-negative values.

Part of the CCNx C Library.

Copyright (C) 2008, 2009 Palo Alto Research Center, Inc.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file indexbuf.h.


Function Documentation

int ccn_indexbuf_append ( struct ccn_indexbuf c,
const size_t *  p,
size_t  n 
)
int ccn_indexbuf_append_element ( struct ccn_indexbuf c,
size_t  v 
)
struct ccn_indexbuf* ccn_indexbuf_create ( void   )  [read]
void ccn_indexbuf_destroy ( struct ccn_indexbuf **  cbp  ) 
int ccn_indexbuf_member ( struct ccn_indexbuf x,
size_t  val 
)
void ccn_indexbuf_move_to_end ( struct ccn_indexbuf x,
size_t  val 
)

Referenced by update_forward_to().

void ccn_indexbuf_move_to_front ( struct ccn_indexbuf x,
size_t  val 
)
void ccn_indexbuf_remove_element ( struct ccn_indexbuf x,
size_t  val 
)
int ccn_indexbuf_remove_first_match ( struct ccn_indexbuf x,
size_t  val 
)

Referenced by do_propagate().

size_t* ccn_indexbuf_reserve ( struct ccn_indexbuf c,
size_t  n 
)

Expand buffer as necessary to hold at least n more values.

Returns:
pointer to reserved space

Definition at line 59 of file ccn_indexbuf.c.

Referenced by ccn_indexbuf_append(), and ccn_indexbuf_append_element().

int ccn_indexbuf_set_insert ( struct ccn_indexbuf x,
size_t  val 
)
Generated on Fri May 13 16:27:17 2011 for Content-Centric Networking in C by  doxygen 1.6.3