pantheios::pan_slice_t Struct Reference
[Pantheios Core API]

#include <pantheios/pantheios.h>

List of all members.


Detailed Description

String slice used by the Pantheios Application Layer API to communicate with the Pantheios Core API.

This structure represents a character string as a slice, in the form of a pointer to the first character, and a count of the number of characters in the slice.

Note:
The slice need not be nul-terminated. Hence, slices may overlap.


Public Member Functions

 pan_slice_t ()
 Constructs a null/empty slice.
 pan_slice_t (char const *p, size_t l)
 Constructs a slice from the given pointer and length.
 pan_slice_t (pan_slice_t const &rhs)
 Copy constructor.
pan_slice_toperator= (pan_slice_t const &rhs)
 Copy assignment operator.

Static Public Member Functions

static size_t get_lazy_length (size_t fromLen, size_t toLen)

Public Attributes

size_t len
 Number of characters in the c-style string represented by the slice.
char const * ptr
 Pointer to the first character in the c-style string represented by the slice.


Constructor & Destructor Documentation

pantheios::pan_slice_t::pan_slice_t  ) 
 

Constructs a null/empty slice.

pantheios::pan_slice_t::pan_slice_t char const *  p,
size_t  l
 

Constructs a slice from the given pointer and length.

pantheios::pan_slice_t::pan_slice_t pan_slice_t const &  rhs  ) 
 

Copy constructor.


Member Function Documentation

static size_t pantheios::pan_slice_t::get_lazy_length size_t  fromLen,
size_t  toLen
[static]
 

pan_slice_t& pantheios::pan_slice_t::operator= pan_slice_t const &  rhs  ) 
 

Copy assignment operator.


Member Data Documentation

size_t pantheios::pan_slice_t::len
 

Number of characters in the c-style string represented by the slice.

char const* pantheios::pan_slice_t::ptr
 

Pointer to the first character in the c-style string represented by the slice.


The documentation for this struct was generated from the following file:

pantheios Library documentation © Matthew Wilson, 2006 SourceForge.net Logo