Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009 #ifndef lgrAnnotationLoader_H_
00010 #define lgrAnnotationLoader_H_
00011
00012 #include "lgrAnn.h"
00013 #include "virtualConstructor.h"
00014 #include <vlutil/vlNetTypes.h>
00015 class DtString;
00016 class DtEnvironment;
00017
00018 namespace MAKLogger
00019 {
00020
00023 class DT_DLL_LGRANN DtLgrAnnotationLoader
00024 {
00025 public:
00026
00027 DT_VIRTUAL_CTR(DtLgrAnnotationLoader,())
00028
00029 virtual ~DtLgrAnnotationLoader();
00030
00033 virtual DtEnvironment loadFile(const DtString& filename,bool& success);
00034
00035 protected:
00036
00037 enum FileFormat
00038 {
00039 Format_Unknown,
00040 Format_LegacyBinaryFormat,
00041 Format_XML
00042 };
00043
00045 struct NetPacketHeader
00046 {
00047 DtNetU32 numBytes;
00048 DtNetU32 flags;
00049 DtNetFloat64 arrivalTime;
00050 };
00051
00053 FileFormat determineFileFormat(const DtString&);
00054
00057 DtEnvironment readBinaryFormat(const DtString& filename,bool& success);
00058
00060 DtEnvironment readXMLFormat(const DtString& filename,bool& success);
00061
00064 static DtString readOneLine( int fd );
00065
00066 };
00067 }
00068
00069 #endif