Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

tuple Struct Reference

An ordered sequence of data values: integers, floats, strings. If this is a template (used during GET and READ operations to match existing tuples), an element can also be a wildcard. More...

#include <tuple.h>


Data Fields

int tag
int num_elts
int string_length
elementelements
char * string_space


Detailed Description

An ordered sequence of data values: integers, floats, strings. If this is a template (used during GET and READ operations to match existing tuples), an element can also be a wildcard.

Definition at line 181 of file tuple.h.


Field Documentation

struct element* tuple::elements
 

The array of elements for this tuple.

Definition at line 205 of file tuple.h.

Referenced by destroy_tuple, LinuxTuple_to_PyTuple, main, make_tuple_internal, print_tuple, PyTuple_to_LinuxTuple, recv_tuple, send_tuple, and tuples_match.

int tuple::num_elts
 

The number of elements in this tuple.

Definition at line 196 of file tuple.h.

Referenced by LinuxTuple_to_PyTuple, make_tuple_internal, print_tuple, PyTuple_to_LinuxTuple, recv_tuple, send_tuple, and tuples_match.

int tuple::string_length
 

The total length of all the strings in this tuple. Useful for planning storage allocation.

Definition at line 201 of file tuple.h.

Referenced by PyTuple_to_LinuxTuple, and recv_tuple.

char* tuple::string_space
 

A pointer to storage space for the tuple's strings. This pointer may not need to be used, if the strings already have their own memory when the tuple is created. The time when you need to use this pointer is when you're receiving a tuple over the network. If the tuple was constructed using make_tuple() or put_tuple(), then its strings are assumed to already have memory space.

Definition at line 215 of file tuple.h.

Referenced by destroy_tuple, make_tuple_internal, PyTuple_to_LinuxTuple, and recv_tuple.

int tuple::tag
 

The reason to put a tag on a tuple is to identify it as a valid tuple. This is used in functions like put_tuple(), get_tuple(), and read_tuple(), so that can accept either a pointer to an existing tuple as an argument, or accept a format string followed by fields (like printf) and be able to tell which is which.

See also:
I_AM_A_TUPLE

Definition at line 192 of file tuple.h.

Referenced by make_tuple_internal, PyTuple_to_LinuxTuple, and recv_tuple.


The documentation for this struct was generated from the following file:
Generated on Sun Mar 30 23:46:51 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002