plaintext/plugin_impl/search_criteria_impl.h

Go to the documentation of this file.
00001 /*
00002  * File Name: search_criteria_impl.h
00003  */
00004 
00005 /*
00006  * This file is part of uds-plugin-plaintext.
00007  *
00008  * uds-plugin-plaintext is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * uds-plugin-plaintext is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00022 /**
00023  * Copyright (C) 2008 iRex Technologies B.V.
00024  * All rights reserved.
00025  */
00026 
00027 #ifndef TEXT_PLUGIN_SEARCH_CRITERIA_H_
00028 #define TEXT_PLUGIN_SEARCH_CRITERIA_H_
00029 
00030 #include "interfaces_utils.h"
00031 #include "plugin_inc.h"
00032 #include "text_base_types.h"
00033 
00034 namespace text
00035 {
00036 
00037 class PluginSearchCriteria : public IPluginUnknown
00038                            , public IPluginSearchCriteria
00039 {
00040 public:
00041     PluginSearchCriteria(void);
00042     ~PluginSearchCriteria(void);
00043 
00044 public:
00045     SearchContext& get_search_context()
00046     {
00047         return sc;
00048     }
00049 
00050 private:
00051     /// IPluginUnknown
00052     static PluginStatus query_interface_impl(
00053         IPluginUnknown    *thiz,
00054         const UDSString   *id, 
00055         void              **ptr );
00056 
00057     static int release_impl(
00058         IPluginUnknown  *thiz );
00059 
00060     /// IPluginSearchCriteria
00061     static PluginStatus set_search_text_impl(
00062         IPluginUnknown    *thiz, 
00063         const UDSString   *text ); 
00064 
00065     static PluginStatus set_case_sensitive_impl(
00066         IPluginUnknown   *thiz, 
00067         const PluginBool is_sensitive );
00068 
00069     static PluginStatus set_match_whole_word_impl(
00070         IPluginUnknown   *thiz, 
00071         const PluginBool do_match_word );
00072 
00073     static PluginStatus set_forward_impl(
00074         IPluginUnknown    *thiz, 
00075         const PluginBool  do_search_forward );
00076 
00077 private:
00078     /// all constructured search criteria instances.
00079     static utils::ObjectTable<PluginSearchCriteria> g_instances_table;
00080 
00081 private:
00082     /// search context, internal used by text plugin.
00083     SearchContext sc;
00084 };
00085 
00086 };  // namespace text
00087 
00088 #endif
00089 
00090 
Generated by  doxygen 1.6.2-20100208