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);
00012 ans->length(length);
00013 return ans;
00014 };
00015
00016 template<class SequenceType>
00017 static SequenceType safeSequence(unsigned int length) {
00018 SequenceType ans(length);
00019 ans.length(length);
00020 return ans;
00021 };
00022
00023 };
00024
00025 };
00026
00027 #endif