SequenceUtils.h

00001 #ifndef SCTAPIIPC_SEQUENCEUTILS_H
00002 #define SCTAPIIPC_SEQUENCEUTILS_H
00003 
00004 namespace Sct {
00005     
00006 class SequenceUtils {
00007  public:
00008 
00009   template<class SequenceType>
00010     static SequenceType * newSafeSequence(unsigned int length) {
00011     SequenceType * ans = new SequenceType(length); // sets MAX length, but doesn't allocate memory.
00012     ans->length(length); // allocates memory
00013     return ans;
00014   };
00015 
00016   template<class SequenceType>
00017     static SequenceType safeSequence(unsigned int length) {
00018     SequenceType ans(length); // sets MAX length, but doesn't allocate memory.
00019     ans.length(length); // allocates memory
00020     return ans;
00021   };
00022   
00023 };
00024 
00025 };
00026 
00027 #endif

Generated on Mon Feb 6 14:01:29 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6