IoDataStreamFactory Class Reference

#include <IoDataStreamFactory.h>

List of all members.

Static Public Member Functions

static IoDataStreamItrCreateDataStreamItr (const char *source, const char *format, unsigned int ddsport=DDS::kPort, unsigned int ddsmxretry=0, unsigned int ddsretrydelay=1, DDS::EClientType clienttype=DDS::kUnknownClientType, string clientname="")

Detailed Description

Definition at line 15 of file IoDataStreamFactory.h.


Member Function Documentation

IoDataStreamItr * IoDataStreamFactory::CreateDataStreamItr ( const char *  source,
const char *  format,
unsigned int  ddsport = DDS::kPort,
unsigned int  ddsmxretry = 0,
unsigned int  ddsretrydelay = 1,
DDS::EClientType  clienttype = DDS::kUnknownClientType,
string  clientname = "" 
) [static]

Definition at line 18 of file IoDataStreamFactory.cxx.

References IoDataStreamItr::IsValid(), Msg::kWarning, MSG, and UtilString::ToUpper().

Referenced by IoInputModule::OpenStreamItr().

00025 {
00026   IoDataStreamItr* itr = 0;
00027   std::string fmt(format);
00028   
00029   if ( UtilString::ToUpper(fmt) == "INPUT") {
00030     itr = new IoInputStreamItr(source);
00031   }
00032   if ( UtilString::ToUpper(fmt) == "REROOT") {
00033     itr = new IoRerootStreamItr(source);
00034   }
00035   if ( UtilString::ToUpper(fmt) == "DDS") {
00036     itr = new IoDDSStreamItr(source,port,ddsmxretry,ddsretrydelay,
00037                              ddsclienttype,ddsclientname);
00038   }
00039   if ( UtilString::ToUpper(fmt) == "DUMMY") {
00040     itr = new IoDummyStreamItr();
00041   }
00042   if (itr && itr->IsValid() ) return itr;
00043   
00044   MSG("Io",Msg::kWarning) 
00045       << "Failed to open data stream iterator of format " << format
00046       << endl;
00047 
00048   if ( itr ) delete itr;
00049 
00050   return 0;
00051 }


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1