1 /* Automatically generated file. Do not edit directly. */ 2 3 /* This file is part of The New Aspell 4 * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL 5 * license version 2.0 or 2.1. You should have received a copy of the 6 * LGPL license along with this library if you did not you can find it 7 * at http://www.gnu.org/. */ 8 9 #include "convert.hpp" 10 #include "string_enumeration.hpp" 11 12 namespace acommon { 13 14 class StringEnumeration; 15 delete_aspell_string_enumeration(StringEnumeration * ths)16extern "C" void delete_aspell_string_enumeration(StringEnumeration * ths) 17 { 18 delete ths; 19 } 20 aspell_string_enumeration_clone(const StringEnumeration * ths)21extern "C" StringEnumeration * aspell_string_enumeration_clone(const StringEnumeration * ths) 22 { 23 return ths->clone(); 24 } 25 aspell_string_enumeration_assign(StringEnumeration * ths,const StringEnumeration * other)26extern "C" void aspell_string_enumeration_assign(StringEnumeration * ths, const StringEnumeration * other) 27 { 28 ths->assign(other); 29 } 30 aspell_string_enumeration_at_end(const StringEnumeration * ths)31extern "C" int aspell_string_enumeration_at_end(const StringEnumeration * ths) 32 { 33 return ths->at_end(); 34 } 35 aspell_string_enumeration_next(StringEnumeration * ths)36extern "C" const char * aspell_string_enumeration_next(StringEnumeration * ths) 37 { 38 const char * s = ths->next(); 39 if (s == 0 || ths->from_internal_ == 0) { 40 return s; 41 } else { 42 ths->temp_str.clear(); 43 ths->from_internal_->convert(s,-1,ths->temp_str); 44 ths->from_internal_->append_null(ths->temp_str); 45 return ths->temp_str.data(); 46 } 47 } 48 aspell_string_enumeration_next_wide(StringEnumeration * ths,int type_width)49extern "C" const void * aspell_string_enumeration_next_wide(StringEnumeration * ths, int type_width) 50 { 51 const char * s = ths->next(); 52 if (s == 0) { 53 return s; 54 } else if (ths->from_internal_ == 0) { 55 assert(type_width == 1); 56 return s; 57 } else { 58 assert(type_width == ths->from_internal_->out_type_width()); 59 ths->temp_str.clear(); 60 ths->from_internal_->convert(s,-1,ths->temp_str); 61 ths->from_internal_->append_null(ths->temp_str); 62 return ths->temp_str.data(); 63 } 64 } 65 66 67 68 } 69 70