~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_function_container.cc

  • Committer: Stewart Smith
  • Date: 2010-03-02 06:41:59 UTC
  • mto: (1309.2.13 build)
  • mto: This revision was merged to the branch mainline in revision 1318.
  • Revision ID: stewart@flamingspork.com-20100302064159-gktw6hcbs3u0fflm
move Item_result out to its own header file and out of common.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "drizzled/plugin/table_function.h"
23
23
#include "drizzled/table_function_container.h"
24
24
 
25
 
#include <iostream>
26
 
 
27
25
using namespace std;
28
26
 
29
27
namespace drizzled
41
39
}
42
40
 
43
41
void TableFunctionContainer::getNames(const string &predicate,
44
 
                                      std::set<std::string> &set_of_names)
 
42
                                      std::set<std::string> &set_of_names)
45
43
{
46
44
  for (ToolMap::iterator it= table_map.begin();
47
45
       it != table_map.end();
49
47
  {
50
48
    plugin::TableFunction *tool= (*it).second;
51
49
 
52
 
    if (tool->visable())
53
 
    {
54
 
      if (predicate.length())
55
 
      {
56
 
        if (boost::iequals(predicate, tool->getSchemaHome()))
57
 
        {
58
 
          set_of_names.insert(tool->getTableLabel());
59
 
        }
60
 
      }
61
 
      else
62
 
      {
63
 
        set_of_names.insert(tool->getTableLabel());
64
 
      }
 
50
    if (predicate.length())
 
51
    {
 
52
      if (not predicate.compare(tool->getSchemaHome()))
 
53
      {
 
54
        set_of_names.insert(tool->getName());
 
55
      }
 
56
    }
 
57
    else
 
58
    {
 
59
      set_of_names.insert(tool->getName());
65
60
    }
66
61
  }
67
62
}
68
63
 
69
64
void TableFunctionContainer::addFunction(plugin::TableFunction *tool)
70
65
{
71
 
  std::pair<ToolMap::iterator, bool> ret=
72
 
    table_map.insert(std::make_pair(tool->getPath(), tool));
 
66
  std::pair<ToolMap::iterator, bool> ret;
 
67
 
 
68
  ret= table_map.insert(std::make_pair(tool->getPath(), tool));
73
69
  assert(ret.second == true);
74
70
}
75
71