text: // This file generated by staff_codegen
  // For more information please visit: http://code.google.com/p/staff/
  // DO NOT EDIT
  
  #ifndef _SERVICEFACTORY_H_
  #define _SERVICEFACTORY_H_
  
  #include <string>
  #include <map>
  #include <staff/common/IService.h>
  
  $(Project.OpeningNs)
    //!  Server-side service factory
    class ServiceFactory
    {
    public:
      //! get service factory instance
      /*! \return service factory instance
        */
      static ServiceFactory& Inst();
  
      //! allocate service proxy by name and ids
      /*! \param sServiceNsName - qualified service name
          \param sSessionId - session id
          \param sInstanceId - instance id
          \return pointer to service
        */
      staff::IService* GetService(const std::string& sServiceNsName,
                                  const std::string& sSessionId,
                                  const std::string& sInstanceId);
  
      //! allocate service proxy by name and ids
      /*! \param sServiceNsName - qualified service name
          \param pCurrentService - pointer to current service to obtain session and instance ids
          \return pointer to service
        */
      staff::IService* GetService(const std::string& sServiceNsName, const staff::IService* pCurrentService);
  
    private:
      ServiceFactory();
      ~ServiceFactory();
  
    private:
      typedef std::map<std::string, staff::PIService> ServicesMap;
      ServicesMap m_mProxies;
    };
  $(Project.EndingNs)
  
  #endif // _SERVICEFACTORY_H_
  