vtkFetchMIServerCollection.h

Go to the documentation of this file.
00001 #ifndef __vtkFetchMIServerCollection_h
00002 #define __vtkFetchMIServerCollection_h
00003 
00004 // FetchMI includes
00005 #include "vtkFetchMIServer.h"
00006 
00007 // MRML includes
00008 #include "vtkMRML.h"
00009 
00010 // VTK includes
00011 #include "vtkObject.h"
00012 #include "vtkCollection.h"
00013 
00014 #include "vtkSlicerFetchMIModuleLogicExport.h"
00015 
00016 #include <vector>
00017 #include <string>
00018 #include <map>
00019 
00020 class VTK_SLICER_FETCHMI_MODULE_LOGIC_EXPORT vtkFetchMIServerCollection : public vtkCollection
00021 {
00022 public:
00023   static vtkFetchMIServerCollection *New();
00024   vtkTypeRevisionMacro(vtkFetchMIServerCollection, vtkCollection);
00025   void PrintSelf(ostream& os, vtkIndent indent);
00026 
00027   // Description:
00028   // Return a server that corresponds to the specified name.
00029   vtkFetchMIServer * FindServerByName ( const char *name );
00030 
00031   // Description:
00032   // Add a new server to the collection with the specified name. The server
00033   // can be retrieved by this name using the FindServerByName (name) method.
00034   void AddServerByName ( vtkFetchMIServer *s, const char *name );
00035 
00036   // Description:
00037   // Delete a server with the specified name from the collection.
00038   void DeleteServerByName ( const char *name );
00039 
00040   // Description:
00041   // Add a Server to the Collection. It is recommended to use the AddServerByName(name)
00042   // method, so the Server can be retrieved and deleted by name.
00043   void AddItem ( vtkFetchMIServer *s ) {
00044   this->vtkCollection::AddItem ( (vtkObject *)s); };
00045 
00046   // Description:
00047   // Get the next Server in the list. Return NULL
00048   // when at the end of the list.
00049   vtkFetchMIServer *GetNextServer() {
00050   return static_cast<vtkFetchMIServer *>(this->GetNextItemAsObject() ); };
00051 
00052   // Description:
00053   // Access routine provided for compatibility with previous
00054   // versions of VTK.  Please use the GetNextServer() variant
00055   // where possible.
00056   vtkFetchMIServer *GetNextItem() { return this->GetNextServer(); };
00057 
00058   // Description:
00059   // This method returns 1 if the service type is known, 0 if not.
00060   // NOTE TO DEVELOPERS: known web service types are enumeraged
00061   // in this class. Currently supported service types are:
00062   // vtkFetchMIServerCollection::XND, and
00063   // vtkFetchMIServerCollection::HID is being developed.
00064   // As new services are supported, please add them to the enumeration
00065   // and the check in this method.
00066   int IsKnownServiceType ( const char *stype );
00067 
00068   // Description: 
00069   // Reentrant safe way to get an object in a collection; just pass the
00070   // same cookie back and forth. 
00071   vtkFetchMIServer *GetNextServer(vtkCollectionSimpleIterator &cookie) {
00072     return static_cast<vtkFetchMIServer *>(this->GetNextItemAsObject(cookie));};
00073 
00074   // Description:
00075   // Method tells logic whether, based on web services type, the
00076   // uri is inferrable or it must be retrieved via posting metadata and parsing response.
00077   // Method looks at map set up for all web service Types to pull out that info.
00078   int InferrableURI ( const char *webserviceType );
00079   
00080   // parameter map: webserviceType, inferrableURI, ... (add others as required)
00081 //BTX
00082   std::map <std::string, std::vector<int> > WebServiceTypesAndParameters;
00083 //ETX
00084 
00085   
00086  protected:
00087   vtkFetchMIServerCollection();
00088   ~vtkFetchMIServerCollection();
00089 
00090   // hide the standard AddItem from the user and compiler.
00091   void AddItem (vtkObject *o ) { this->vtkCollection::AddItem(o); } ;
00092   
00093   vtkFetchMIServerCollection(const vtkFetchMIServerCollection&);
00094   void operator=(const vtkFetchMIServerCollection&); private:
00095 };
00096 
00097 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1