~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_function_container.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2010 Sun Microsystems
 
4
 *  Copyright (C) 2010 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
22
 
#include "drizzled/plugin/table_function.h"
23
 
#include "drizzled/table_function_container.h"
 
21
#include <config.h>
 
22
#include <drizzled/plugin/table_function.h>
 
23
#include <drizzled/table_function_container.h>
24
24
 
25
25
#include <iostream>
26
26
 
49
49
  {
50
50
    plugin::TableFunction *tool= (*it).second;
51
51
 
52
 
    if (predicate.length())
 
52
    if (tool->visable())
53
53
    {
54
 
      if (boost::iequals(predicate, tool->getSchemaHome()))
 
54
      if (predicate.length())
 
55
      {
 
56
        if (boost::iequals(predicate, tool->getSchemaHome()))
 
57
        {
 
58
          set_of_names.insert(tool->getTableLabel());
 
59
        }
 
60
      }
 
61
      else
55
62
      {
56
63
        set_of_names.insert(tool->getTableLabel());
57
64
      }
58
65
    }
59
 
    else
60
 
    {
61
 
      set_of_names.insert(tool->getTableLabel());
62
 
    }
63
66
  }
64
67
}
65
68
 
66
69
void TableFunctionContainer::addFunction(plugin::TableFunction *tool)
67
70
{
68
 
  std::pair<ToolMap::iterator, bool> ret;
69
 
 
70
 
  ret= table_map.insert(std::make_pair(tool->getPath(), tool));
 
71
  std::pair<ToolMap::iterator, bool> ret=
 
72
    table_map.insert(std::make_pair(tool->getPath(), tool));
71
73
  assert(ret.second == true);
72
74
}
73
75