~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/functions.h

Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLED_GENERATOR_FUNCTIONS_H
22
 
#define DRIZZLED_GENERATOR_FUNCTIONS_H
23
 
 
24
 
#include "drizzled/plugin/function.h"
 
21
#pragma once
 
22
 
 
23
#include <drizzled/plugin/function.h>
 
24
 
 
25
#include <drizzled/visibility.h>
25
26
 
26
27
namespace drizzled {
27
28
namespace generator {
28
29
 
29
 
class Functions
 
30
class DRIZZLED_API Functions
30
31
{
31
32
  Session &session;
 
33
  typedef std::vector <std::string> vector;
32
34
  std::string function_name;
33
 
  plugin::Function::UdfMap::const_iterator udf_iter;
 
35
  vector function_list;
 
36
  vector::iterator iter;
34
37
 
35
38
public:
36
39
 
38
41
 
39
42
  operator std::string*()
40
43
  {
41
 
    if (udf_iter == plugin::Function::getMap().end())
 
44
    if (iter == function_list.end())
42
45
      return NULL;
43
46
 
44
 
    function_name= (*udf_iter).first;
45
 
    udf_iter++;
 
47
    function_name= *iter;
 
48
    iter++;
46
49
 
47
50
    return &function_name;
48
51
  }
51
54
} /* namespace generator */
52
55
} /* namespace drizzled */
53
56
 
54
 
#endif /* DRIZZLED_GENERATOR_FUNCTIONS_H */