Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

boxes_delta.cc

Go to the documentation of this file.
00001 // Box Delta implementation -*- C++ -*-
00002 
00003 // Copyright (C) 2001-2003 Hermann Schichl
00004 //
00005 // This file is part of the COCONUT API.  This library
00006 // is free software; you can redistribute it and/or modify it under the
00007 // terms of the Library GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // Library GNU General Public License for more details.
00015 
00016 // As a special exception, you may use this file as part of a free software
00017 // library without restriction.  Specifically, if other files instantiate
00018 // templates or use macros or inline functions from this file, or you compile
00019 // this file and link it with other files to produce an executable, this
00020 // file does not by itself cause the resulting executable to be covered by
00021 // the Library GNU General Public License.  This exception does not however
00022 // invalidate any other reasons why the executable file might be covered by
00023 // the Library GNU General Public License.
00024 
00027 #include <boxes_delta.h>
00028 #include <print_seq.h>
00029 
00030 bool boxes_delta::apply(work_node& _x, undelta_base*& _u) const
00031 {
00032   std::cerr << "Cannot directly apply a boxes_delta: convert missing!" <<
00033         std::endl;
00034   _u = NULL;
00035   return false;
00036 }
00037 
00038 void boxes_delta::create_table(work_node& _x,
00039                                           vdbl::standard_table*& ptb,
00040                                           const std::string& __t) const
00041 {
00042   _x.get_database_ptr()->create_table("box", _x.get_dbuserid());
00043   ptb = (vdbl::standard_table*)
00044               _x.get_database_ptr()->get_table("box", _x.get_dbuserid());
00045   if(ptb == NULL)
00046     throw "Database inconsistency: Programming Error!";
00047   ptb->add_col("x",
00048       vdbl::typed_col<std::vector<interval> >(std::vector<interval>()),
00049                           vdbl::colflags());
00050   vdbl::colid _xi(ptb->get_col_id("x"));
00051   ptb->add_col("exclusion box", vdbl::typed_col<bool>(false),
00052                vdbl::colflags(true));
00053   ptb->add_col("intersecting", vdbl::method_col<box_check_intersection>(
00054                                 box_check_intersection(_xi)),
00055                      vdbl::colflags(true));
00056   // actually, this should be a method_col!
00057   ptb->add_col("contains optimum", vdbl::typed_col<bool>(false),
00058                vdbl::colflags(true));
00059   ptb->add_col("eval region", vdbl::typed_col<bool>(false),
00060                               vdbl::colflags(true));
00061 }
00062 

Generated on Tue Nov 4 01:57:56 2003 for COCONUT API by doxygen1.2.18