~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/functions.h

  • Committer: Olaf van der Spek
  • Date: 2011-07-07 13:41:07 UTC
  • mto: This revision was merged to the branch mainline in revision 2385.
  • Revision ID: olafvdspek@gmail.com-20110707134107-6mi7pauiatxtf4oe
Rename strmake to strdup (standard name)

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
 
21
#pragma once
23
22
 
24
 
#include "drizzled/plugin/function.h"
 
23
#include <drizzled/plugin/function.h>
 
24
#include <drizzled/visibility.h>
25
25
 
26
26
namespace drizzled {
27
27
namespace generator {
28
28
 
29
 
class Functions
 
29
class DRIZZLED_API Functions
30
30
{
31
 
  Session &session;
32
 
  std::string function_name;
33
 
  plugin::Function::UdfMap::const_iterator udf_iter;
34
 
 
35
31
public:
36
 
 
37
 
  Functions(Session &arg);
 
32
  Functions(Session&);
38
33
 
39
34
  operator std::string*()
40
35
  {
41
 
    if (udf_iter == plugin::Function::getMap().end())
 
36
    if (iter == functions.end())
42
37
      return NULL;
43
 
 
44
 
    function_name= (*udf_iter).first;
45
 
    udf_iter++;
46
 
 
 
38
    function_name= *iter++;
47
39
    return &function_name;
48
40
  }
 
41
  typedef std::vector<std::string> functions_t;
 
42
  functions_t functions;
 
43
 
 
44
  std::string function_name;
 
45
  functions_t::iterator iter;
 
46
 
49
47
};
50
48
 
51
49
} /* namespace generator */
52
50
} /* namespace drizzled */
53
51
 
54
 
#endif /* DRIZZLED_GENERATOR_FUNCTIONS_H */