comparison Core/SQLite/FunctionContext.cpp @ 759:8cfc6119a5bd dicom-rt

integration mainline -> dicom-rt
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Apr 2014 16:04:55 +0200
parents 72dc919a028c
children a811bdf8b8eb
comparison
equal deleted inserted replaced
605:b82292ba2083 759:8cfc6119a5bd
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
87 std::string FunctionContext::GetStringValue(unsigned int index) const 87 std::string FunctionContext::GetStringValue(unsigned int index) const
88 { 88 {
89 CheckIndex(index); 89 CheckIndex(index);
90 return std::string(reinterpret_cast<const char*>(sqlite3_value_text(argv_[index]))); 90 return std::string(reinterpret_cast<const char*>(sqlite3_value_text(argv_[index])));
91 } 91 }
92
93 bool FunctionContext::IsNullValue(unsigned int index) const
94 {
95 CheckIndex(index);
96 return sqlite3_value_type(argv_[index]) == SQLITE_NULL;
97 }
92 98
93 void FunctionContext::SetNullResult() 99 void FunctionContext::SetNullResult()
94 { 100 {
95 sqlite3_result_null(context_); 101 sqlite3_result_null(context_);
96 } 102 }