Path: blob/trunk/cpp/iedriver/CommandHandlerRepository.h
2867 views
// Licensed to the Software Freedom Conservancy (SFC) under one1// or more contributor license agreements. See the NOTICE file2// distributed with this work for additional information3// regarding copyright ownership. The SFC licenses this file4// to you under the Apache License, Version 2.0 (the "License");5// you may not use this file except in compliance with the License.6// You may obtain a copy of the License at7//8// http://www.apache.org/licenses/LICENSE-2.09//10// Unless required by applicable law or agreed to in writing, software11// distributed under the License is distributed on an "AS IS" BASIS,12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13// See the License for the specific language governing permissions and14// limitations under the License.1516#ifndef WEBDRIVER_IE_COMMANDHANDLERREPOSITORY_H_17#define WEBDRIVER_IE_COMMANDHANDLERREPOSITORY_H_1819#include <map>20#include <memory>21#include <string>2223namespace webdriver {2425// Forward declaration of classes.26class IECommandHandler;2728typedef std::shared_ptr<IECommandHandler> CommandHandlerHandle;2930class CommandHandlerRepository {31public:32CommandHandlerRepository(void);33virtual ~CommandHandlerRepository(void);3435bool IsValidCommand(const std::string& command_name);36CommandHandlerHandle GetCommandHandler(const std::string& command_name);3738private:39typedef std::map<std::string, CommandHandlerHandle> CommandHandlerMap;4041void PopulateCommandHandlers(void);4243CommandHandlerMap command_handlers_;44};4546} // namespace webdriver4748#endif // WEBDRIVER_IE_COMMANDHANDLERREPOSITORY_H_495051