#include <VxSegmentationTiedSvt.h>
Public Types | |
typedef POA_HxCorba::VxSegmentation_tie< VxSegmentationTiedSvt > | TieT |
typedef VxSegmentList | HxT |
typedef HxCorba::VxSegmentation | CorbaT |
Public Methods | |
VxSegmentationTiedSvt (const VxSegmentList &obj) | |
virtual | ~VxSegmentationTiedSvt () |
virtual HxCorba::VxSegmentSeq * | getAll () |
virtual HxCorba::VxTimeSpanSeq * | getTimeSpans () |
virtual HxCorba::VxSegment_ptr | getSegment (CORBA::Long index) |
virtual HxCorba::VxSegment_ptr | mapsToSegment (CORBA::Long timeSpan) |
virtual HxCorba::StringSeq * | getIds () |
virtual HxCorba::StringSeq * | getTypes () |
|
|
|
|
|
|
|
00021 : VxSegmentList(obj) 00022 { 00023 } |
|
00026 { 00027 } |
|
00031 { 00032 return HxMakeTiedServantsList<VxSegmentTiedSvt, VxSegmentList>(*this); 00033 } |
|
00037 { 00038 HxCorba::VxTimeSpanSeq_var seq = new HxCorba::VxTimeSpanSeq(); 00039 seq->length(VxSegmentList::size()); 00040 00041 VxSegmentList::const_iterator it = VxSegmentList::begin(); 00042 for(int i=0; it != VxSegmentList::end(); i++, it++) { 00043 seq[i].start = it->start(); 00044 seq[i].end = it->end(); 00045 } 00046 00047 return seq._retn(); 00048 } |
|
00071 { 00072 VxSegment seg = VxSegmentList::get(index); 00073 return HxRegisterTiedServant<VxSegmentTiedSvt>(seg); 00074 } |
|
00078 { 00079 VxSegment result = VxSegment(-1,-1); 00080 00081 VxSegmentList::const_iterator cit; 00082 for (cit=VxSegmentList::begin_const(); cit!=VxSegmentList::end_const(); cit++) 00083 { 00084 if (timeSpan>=cit->start() && timeSpan<=cit->end()) 00085 return HxRegisterTiedServant<VxSegmentTiedSvt>(*cit); 00086 } 00087 00088 // given timespan does not occur within one of the segments of the list 00089 return HxRegisterTiedServant<VxSegmentTiedSvt>(VxSegment(-1, -1)); 00090 } |
|
00052 { 00053 vector<HxString> ids = VxSegmentList::getIds(); 00054 return HxMakeStringList<HxCorba::StringSeq, vector<HxString> >(ids); 00055 } |
|
00059 { 00060 map<HxString,HxString> types = VxSegmentList::getTypes(); 00061 vector<HxString> ids = VxSegmentList::getIds(); 00062 list<HxString> lst; 00063 for(std::vector<HxString>::const_iterator it = ids.begin(); it != ids.end(); it++) 00064 lst.push_back(types[*it]); 00065 00066 return HxMakeStringList<HxCorba::StringSeq, list<HxString> >(lst); 00067 } |