Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

dtpf::DataFormat Class Reference

#include <DataFormat.h>

Inheritance diagram for dtpf::DataFormat:

dtpf::ParameterGroup dtpf::ParameterTreeVertex List of all members.

Detailed Description

DataFormat provides grouping and management of Parameters describing the data being transferred over a connection between two Nodes and the potential formats for a connection endpoint.


Public Member Functions

 DataFormat ()
 Create an empty, unnamed DataFormat.
 DataFormat (const muscle::String &name)
 Create an empty, named DataFormat.
 DataFormat (const DataFormat &that)
 Create a deep copy of an existing DataFormat, including all child Parameters.
virtual ~DataFormat ()
 Delete a DataFormat and any memory it owns.
DataFormatoperator= (const DataFormat &that)
 Assign a DataFormat from another.
bool operator== (const DataFormat &that) const
 Compare against another DataFormat for equality.
bool operator!= (const DataFormat &that) const
 Compare against another DataFormat for inequality.
status_t Compatible (const DataFormat &that) const
 Compare against another DataFormat for compatability.
DataFormatIntersection (const DataFormat &that) const
 Retrieve the intersection of two DataFormats.
DataFormatDefault () const
 Get a DataFormat with Parameters representing the default values for this DataFormat.
virtual uint32 TypeCode () const
 Get the type code for the DataFormat class.
virtual uint32 FlattenedSize () const
 Returns the number of bytes needed to store a DataFormat object in its current state.
virtual void Flatten (uint8 *buffer) const
 Write a DataFormat's state to a byte array.
virtual status_t Unflatten (const uint8 *buffer, uint32 size)
 Set a DataFormat object's state from a byte array.


Constructor & Destructor Documentation

dtpf::DataFormat::DataFormat  ) 
 

Create an empty, unnamed DataFormat.

A name must be given to the format before it can be used.

dtpf::DataFormat::DataFormat const muscle::String &  name  ) 
 

Create an empty, named DataFormat.

Parameters:
name The name of the format.

dtpf::DataFormat::DataFormat const DataFormat that  ) 
 

Create a deep copy of an existing DataFormat, including all child Parameters.

Parameters:
that The DataFormat to copy from.

virtual dtpf::DataFormat::~DataFormat  )  [virtual]
 

Delete a DataFormat and any memory it owns.


Member Function Documentation

status_t dtpf::DataFormat::Compatible const DataFormat that  )  const
 

Compare against another DataFormat for compatability.

Two DataFormats are considered compatible if the format names are equal, each Parameter in this is found in that with the same ParameterKind and overlapping allowed Parameter values.

Parameters:
that The DataFormat to compare against.
Returns:
E_OK if the two formats are compatible.

E_BAD_FORMAT if the two formats are incompatible.

DataFormat* dtpf::DataFormat::Default  )  const
 

Get a DataFormat with Parameters representing the default values for this DataFormat.

Returns:
A pointer to a DataFormat representing the default parameter values for this format. The caller gains ownership of this memory.

NULL if the default format could not be properly constructed.

virtual void dtpf::DataFormat::Flatten uint8 *  buffer  )  const [virtual]
 

Write a DataFormat's state to a byte array.

Parameters:
buffer The byte array to write to. The caller should ensure that this is at least FlattenedSize() bytes in length.

Reimplemented from dtpf::ParameterGroup.

virtual uint32 dtpf::DataFormat::FlattenedSize  )  const [virtual]
 

Returns the number of bytes needed to store a DataFormat object in its current state.

Returns:
The flattened size for a DataFormat object.

Reimplemented from dtpf::ParameterGroup.

DataFormat* dtpf::DataFormat::Intersection const DataFormat that  )  const
 

Retrieve the intersection of two DataFormats.

The intersection of two DataFormats will have one Parameter for each parameter of the same name and ParameterKind found in both DataFormats. Each of the parameters in the intersection DataFormat represent the intersection of allowed values for the corresponding parameter in both input formats.

Parameters:
that The DataFormat to compare against.
Returns:
A pointer to a DataFormat representing the intrersection of this and that. The caller gains ownership of this memory.

NULL if the DataFormats have different names or the intersection could not be properly constructed.

bool dtpf::DataFormat::operator!= const DataFormat that  )  const
 

Compare against another DataFormat for inequality.

This is the logical negation of the == operator.

Parameters:
that The DataFormat to compare against.
Returns:
True if the two DataFormats are not equal, false otherwise.

DataFormat& dtpf::DataFormat::operator= const DataFormat that  ) 
 

Assign a DataFormat from another.

Copies will be made of all child Parameters in the copied DataFormat.

Parameters:
that The DataFormat to assign from.
Returns:
A reference to *this.

bool dtpf::DataFormat::operator== const DataFormat that  )  const
 

Compare against another DataFormat for equality.

Two DataFormats are equal iff they have the same name and their Parameters are all equivalent.

Parameters:
that The DataFormat to compare against.
Returns:
True if the two DataFormats are equal, false otherwise.

virtual uint32 dtpf::DataFormat::TypeCode  )  const [virtual]
 

Get the type code for the DataFormat class.

Returns:
The DataFormat type code.

Reimplemented from dtpf::ParameterGroup.

virtual status_t dtpf::DataFormat::Unflatten const uint8 *  buffer,
uint32  size
[virtual]
 

Set a DataFormat object's state from a byte array.

Parameters:
buffer The byte array to unflatten from.
size The length of buffer.
Returns:
E_OK if successful

E_BAD_ARGUMENT if buffer is null or size is less than FlattenedSize().

Reimplemented from dtpf::ParameterGroup.


The documentation for this class was generated from the following file:
Generated on Wed Aug 3 07:26:19 2005 for DTPF by  doxygen 1.3.9.1