Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | Related Pages

libarc Namespace Reference

The public libarc API. More...


Classes

class  Unsupported_ARC_Format_Exception
 The ARC file is in an unrecognized or unsupported format. More...

class  ARC_File
 An ARC file. More...

class  ARC_Member
 A member of an ARC file. More...

class  Member_Iterator
 An iterator over the members of an ARC file. More...

class  Media_Type
 A media type. More...


Functions

bool operator== (const Media_Type &lhs, const Media_Type &rhs)
 Compare Media-Type values.

template<typename Function> void for_each (Member_Iterator *iter, Function f)
 Apply a function to each member of an ARC_File.

template<typename Predicate, typename Function> void for_each_if (Member_Iterator *iter, Predicate p, Function f)
 Conditionally apply a function to each member of an ARC_File.

template<typename Predicate> const ARC_Memberfind_if (Member_Iterator *iter, Predicate p)
 Find the first member matching the predicate.

template<typename Predicate> size_t count_if (Member_Iterator *iter, Predicate p)
 Return the number of members matching the predicate.


Variables

const int LIBARC_VERSION = 0x000201
 Version number of the library.

const char * LIBARC_VERSION_STRING = "0.2.1"
 Version string of the library.


Detailed Description

The public libarc API.

This namespace contains the public libarc API and associated utilities.

Author:
Tom Emerson
Date:
2004-05-02


Function Documentation

size_t count_if Member_Iterator *  iter,
Predicate  p
 

Return the number of members matching the predicate.

The predicate should take a single const ARC_Member* argument and return a bool.

Parameters:
iter The iterator.
p The predicate.
Returns:
The number of members matching the predicate.

const ARC_Member* find_if Member_Iterator *  iter,
Predicate  p
 

Find the first member matching the predicate.

The predicate should take a single const ARC_Member* argument and return a bool.

Parameters:
iter The iterator.
p The predicate.
Returns:
The matching ARC member.

void for_each Member_Iterator *  iter,
Function  f
 

Apply a function to each member of an ARC_File.

The function should take a single const ARC_Member* argument returning void.

Parameters:
iter The iterator.
f The function to apply to each member.

void for_each_if Member_Iterator *  iter,
Predicate  p,
Function  f
 

Conditionally apply a function to each member of an ARC_File.

The function should take a single const ARC_Member* argument returning void.

The predicate should take a single const ARC_Member* argument and return a bool.

Parameters:
iter The iterator.
p The predicate.
f The function.

bool operator== const Media_Type &  lhs,
const Media_Type &  rhs
[inline]
 

Compare Media-Type values.

Two media types are compared, supporting wild-cards: text/html and text/* each match text/html.

Parameters:
rhs Right-hand operand.
lhs Left-hand operand.
Returns:
True if the two Media_Type's are equivalent.


Variable Documentation

const int LIBARC_VERSION = 0x000201 [static]
 

Version number of the library.

const char* LIBARC_VERSION_STRING = "0.2.1" [static]
 

Version string of the library.


Generated on Tue Jun 8 21:30:14 2004 by doxygen SourceForge.net Logo