Diff for /parser3/src/classes/table.C between versions 1.188 and 1.192

version 1.188, 2003/11/04 12:04:39 version 1.192, 2003/11/20 16:34:23
Line 5 Line 5
         Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
 */  */
   
 static const char* IDENT_TABLE_C="$Date$";  static const char * const IDENT_TABLE_C="$Date$";
   
 #include "classes.h"  #include "classes.h"
 #include "pa_vmethod_frame.h"  #include "pa_vmethod_frame.h"
Line 21  static const char* IDENT_TABLE_C="$Date$ Line 21  static const char* IDENT_TABLE_C="$Date$
   
 class MTable: public Methoded {  class MTable: public Methoded {
 public: // VStateless_class  public: // VStateless_class
         Value* create_new_value() { return new VTable(); }          Value* create_new_value(Pool&) { return new VTable(); }
   
 public:  public:
         MTable();          MTable();
Line 384  static void maybe_enclose( String& to, c Line 384  static void maybe_enclose( String& to, c
         if(encloser) {          if(encloser) {
                 to<<*sencloser;                  to<<*sencloser;
                 // while we have 'encloser'...                  // while we have 'encloser'...
                 for( size_t pos_before, pos_after=0; (pos_before=from.pos( encloser, pos_after ))!=STRING_NOT_FOUND; ) {                  size_t pos_after=0;
                   for( size_t pos_before; (pos_before=from.pos( encloser, pos_after ))!=STRING_NOT_FOUND; pos_after=pos_before+1) {
             to<<from.mid(pos_before+1/*+found encloser*/, pos_after-pos_before);              to<<from.mid(pos_before+1/*+found encloser*/, pos_after-pos_before);
                         to<<*sencloser; // doubling encloser                          to<<*sencloser; // doubling encloser
                         pos_after=pos_before+1;  
                 }                  }
                 // last piece                  // last piece
                 size_t from_length=from.length();                  size_t from_length=from.length();
Line 761  struct Expression_is_true_info { Line 761  struct Expression_is_true_info {
         Value* expression_code;          Value* expression_code;
 };  };
 #endif  #endif
 static bool expression_is_true(Table& self, void* ainfo) {  static bool expression_is_true(Table&, Expression_is_true_info* info) {
         Expression_is_true_info& info=*static_cast<Expression_is_true_info*>(ainfo);          return info->r->process_to_value(*info->expression_code).as_bool();
         return info.r->process_to_value(*info.expression_code).as_bool();  
 }  }
 static bool _locate_expression(Table& table, Table::Action_options o,  static bool _locate_expression(Table& table, Table::Action_options o,
                                Request& r, MethodParams& params) {                                 Request& r, MethodParams& params) {
Line 775  static bool _locate_expression(Table& ta Line 774  static bool _locate_expression(Table& ta
         return table.table_first_that(expression_is_true, &info, o);          return table.table_first_that(expression_is_true, &info, o);
 }  }
 static bool _locate_name_value(Table& table, Table::Action_options o,  static bool _locate_name_value(Table& table, Table::Action_options o,
                                Request& r, MethodParams& params) {                                 Request&, MethodParams& params) {
         check_option_param(o.defined, params, 2,          check_option_param(o.defined, params, 2,
                 "locate by locate by name has parameters: name, value and, maybe, options");                  "locate by locate by name has parameters: name, value and, maybe, options");
         const String& name=params.as_string(0, "column name must be string");          const String& name=params.as_string(0, "column name must be string");
Line 794  static void _locate(Request& r, MethodPa Line 793  static void _locate(Request& r, MethodPa
 }  }
   
   
 static void _flip(Request& r, MethodParams& params) {  static void _flip(Request& r, MethodParams&) {
         Table& old_table=GET_SELF(r, VTable).table();          Table& old_table=GET_SELF(r, VTable).table();
         Table& new_table=*new Table(0);          Table& new_table=*new Table(0);
         if(size_t old_count=old_table.count())          if(size_t old_count=old_table.count())

Removed from v.1.188  
changed lines
  Added in v.1.192


E-mail: