Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

sedris::seHelperDRM Class Reference
[Utility Classes]

#include <seHelperDRM.h>

List of all members.

Public Member Functions

 seHelperDRM ()
 Constructor.

long increment (SE_DRM_Class type)
 Increments the number of counts for a specific type.

long getCount (SE_DRM_Class type=(SE_DRM_Class) 0)
 Returns the count for a specific type, or total count if no type specified.

void reset ()
 Resets all the counts to 0.


Static Public Member Functions

const char * getName (SE_DRM_Class type)
 Returns a DRM type as a string in the form "Model Library".

const char * getUnderscoreName (SE_DRM_Class type)
 Returns a DRM type as a string in the form "Model_Library".

const char * getShortName (SE_DRM_Class type)
 Returns a DRM type as a string in the form "ModelLibrary".

void setSE_String (SE_String &str, const SE_Character *chars, SE_Short_Integer_Unsigned len=0, SE_Locale locale=SE_LOCALE_DEFAULT)
void releaseSE_String (SE_String &str)
 Frees the string data.

void setSE_URN (SE_URN &urn, const SE_Character *chars, SE_Short_Integer_Positive len=0)
void releaseSE_URN (SE_URN &urn)
 Frees the URN data.


Protected Attributes

unsigned long _drmCounts [SE_NUM_DRM_CLASSES]
 Counts for individual classes.

unsigned long _totalCount
 Total count.


Detailed Description

Used to keep counts of DRM objects and print their names. With seHelperDRM you can: Example:
seHelperDRM my_counts;

while (some loop)
{
    if (some flag for <i>type</i>)
        my_counts.increment(type);
}

// show results/counts:
cout << "Total of " << my_counts.getCount() << " match flag" << endl;
for (i = 1; i < SE_NUM_DRM_CLASSES; i++)
{
    if (my_counts.getCount(i) > 0)
        cout << seHelperDRM::getName(i) << " has " << my_counts.getCount(i) << endl;
}
To maintain many counts, use as many seHelperDRM instances as needed.

Author:
Warren Macchi


Constructor & Destructor Documentation

sedris::seHelperDRM::seHelperDRM  ) 
 


Member Function Documentation

long sedris::seHelperDRM::getCount SE_DRM_Class  type = (SE_DRM_Class) 0  ) 
 

const char* sedris::seHelperDRM::getName SE_DRM_Class  type  )  [static]
 

const char* sedris::seHelperDRM::getShortName SE_DRM_Class  type  )  [static]
 

const char* sedris::seHelperDRM::getUnderscoreName SE_DRM_Class  type  )  [static]
 

long sedris::seHelperDRM::increment SE_DRM_Class  type  ) 
 

void sedris::seHelperDRM::releaseSE_String SE_String &  str  )  [static]
 

void sedris::seHelperDRM::releaseSE_URN SE_URN &  urn  )  [static]
 

void sedris::seHelperDRM::reset  ) 
 

void sedris::seHelperDRM::setSE_String SE_String &  str,
const SE_Character *  chars,
SE_Short_Integer_Unsigned  len = 0,
SE_Locale  locale = SE_LOCALE_DEFAULT
[static]
 

Frees previous SE_String values and sets a new one. Allocates the characters in an SE_String and sets length as needed.

Warning:
The SE_String passed in must be initialized prior to using this method (e.g. my_str = SE_STRING_DEFAULT) or a memory access error will occur when the memory is freed.
Parameters:
str in/out: a pointer to the SE_String to set
chars in: the character data
len in (optional): the length of the character data, or 0 to be computed based on the NULL terminating character in the data
locale in (optional): the locale for the string

void sedris::seHelperDRM::setSE_URN SE_URN &  urn,
const SE_Character *  chars,
SE_Short_Integer_Positive  len = 0
[static]
 

Frees previous SE_URN values and sets a new one. Allocates the characters in an SE_URN and sets length as needed.

Warning:
The SE_URN passed in must be initialized prior to using this method (e.g. my_urn = SE_URN_DEFAULT) or a memory access error will occur when the memory is freed.
Parameters:
urn in/out: a pointer to the SE_URN to set
chars in: the character data
len in (optional): the length of the character data, or 0 to be computed based on the NULL terminating character in the data


Member Data Documentation

unsigned long sedris::seHelperDRM::_drmCounts[SE_NUM_DRM_CLASSES] [protected]
 

unsigned long sedris::seHelperDRM::_totalCount [protected]
 


The documentation for this class was generated from the following file:
SEDRIS Transmittal Access C++ API 4.0.0 beta - 14 Jul 2004
Copyright © 2004 SEDRIS Docs by Doxygen 1.3.2