2 * Copyright 2012-2013 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.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 at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * 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 and
14 * limitations under the License.
18 #ifndef __STRING_PROVIDER_H__
19 #define __STRING_PROVIDER_H__
22 #include "string_bin_parser.h"
23 #include "istring_provider.h"
24 class String_Provider: public IString_Provider{
26 String_Provider(const String_Bin_Parser* sp): m_sp(sp) {}
27 const char* get_string_by_id(const int id)const{
28 if (m_sp == NULL) return NULL;
30 const std::vector<const char*>& string_depository = m_sp->get_string_depository();
31 if (id >= 0 && id < string_depository.size())
32 return string_depository.at(id);
37 const String_Bin_Parser *m_sp;