OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str Class Reference
+ Inheritance diagram for import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str:
+ Collaboration diagram for import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str:

Public Member Functions

 Function_str ()
 
const mup::char_type * GetDesc () const final
 
mup::IToken * Clone () const final
 
void Eval (mup::ptr_val_type &ret, const mup::ptr_val_type *args, int argc) final
 

Detailed Description

Definition at line 271 of file ExpressionParser.cpp.

Constructor & Destructor Documentation

import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str::Function_str ( )
inline

Definition at line 273 of file ExpressionParser.cpp.

273 : mup::ICallback(mup::cmFUNC, _T("str"), 1) {}

Member Function Documentation

mup::IToken* import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str::Clone ( ) const
inlinefinal
void import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str::Eval ( mup::ptr_val_type &  ret,
const mup::ptr_val_type *  args,
int  argc 
)
inlinefinal

Definition at line 276 of file ExpressionParser.cpp.

References run_benchmark_import::args, CHECK_EQ, import_export::anonymous_namespace{ExpressionParser.cpp}::ss_to_ms(), and THROW_INVALID_PARAMETER.

276  {
277  CHECK_EQ(argc, 1);
278  switch (args[0]->GetType()) {
279  case 'i':
280  case 'f':
281  *ret = args[0]->ToString();
282  break;
283  case 's':
284  *ret = args[0]->GetString();
285  break;
286  case 'b':
287  *ret = args[0]->GetBool() ? ss_to_ms("true") : ss_to_ms("false");
288  break;
289  default: {
290  THROW_INVALID_PARAMETER(0, "unsupported type");
291  }
292  }
293  }
#define CHECK_EQ(x, y)
Definition: Logger.h:230
#define THROW_INVALID_PARAMETER(arg, what)

+ Here is the call graph for this function:

const mup::char_type* import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str::GetDesc ( ) const
inlinefinal

Definition at line 274 of file ExpressionParser.cpp.

274 { return _T("cast a value to a string"); };

The documentation for this class was generated from the following file: