SASC-NG
DVBSoftCAM

SI::DescriptorGroup Class Reference

#include <si.h>

Inheritance diagram for SI::DescriptorGroup:

List of all members.

Public Member Functions

 DescriptorGroup (bool deleteOnDesctruction=true)
 ~DescriptorGroup ()
void Add (GroupDescriptor *d)
void Delete ()
int getLength ()
GroupDescriptor ** getDescriptors ()
bool isComplete ()

Protected Attributes

int length
GroupDescriptor ** array
bool deleteOnDesctruction

Detailed Description

Definition at line 433 of file si.h.


Constructor & Destructor Documentation

SI::DescriptorGroup::DescriptorGroup ( bool  deleteOnDesctruction = true)

Definition at line 177 of file si.c.

References array, deleteOnDesctruction, and length.

SI::DescriptorGroup::~DescriptorGroup ( )

Definition at line 183 of file si.c.

References array, Delete(), and deleteOnDesctruction.

                                  {
   if (deleteOnDesctruction)
      Delete();
   delete[] array;
}

Member Function Documentation

void SI::DescriptorGroup::Add ( GroupDescriptor *  d)

Definition at line 197 of file si.c.

References array, SI::GroupDescriptor::getDescriptorNumber(), SI::GroupDescriptor::getLastDescriptorNumber(), i, and length.

                                            {
   if (!array) {
      length=d->getLastDescriptorNumber()+1;
      array=new GroupDescriptor*[length]; //numbering is zero-based
      for (int i=0;i<length;i++)
         array[i]=0;
   } else if (length != d->getLastDescriptorNumber()+1)
      return; //avoid crash in case of misuse
   array[d->getDescriptorNumber()]=d;
}
void SI::DescriptorGroup::Delete ( )

Definition at line 189 of file si.c.

References array, i, and length.

Referenced by ~DescriptorGroup().

                             {
   for (int i=0;i<length;i++)
      if (array[i]!=0) {
         delete array[i];
         array[i]=0;
      }
}
GroupDescriptor** SI::DescriptorGroup::getDescriptors ( ) [inline]

Definition at line 440 of file si.h.

References array.

{ return array; }
int SI::DescriptorGroup::getLength ( ) [inline]

Definition at line 439 of file si.h.

References length.

{ return length; }
bool SI::DescriptorGroup::isComplete ( )

Definition at line 208 of file si.c.

References array, i, and length.

                                 {
   for (int i=0;i<length;i++)
      if (array[i]==0)
         return false;
   return true;
}

Member Data Documentation

Definition at line 445 of file si.h.

Referenced by DescriptorGroup(), and ~DescriptorGroup().

int SI::DescriptorGroup::length [protected]

Definition at line 443 of file si.h.

Referenced by Add(), Delete(), DescriptorGroup(), getLength(), and isComplete().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines