Ignore:
Timestamp:
11/13/15 11:45:12 (8 years ago)
Author:
mhnguyen
Message:

Changing name of attributes of zoom

Test
+) test_client and test_complete are correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/zoom_axis.cpp

    r681 r787  
    2626  { 
    2727    int axisIBegin, axisNi, axisGlobalSize; 
    28     int zoom_begin, zoom_end, zoom_size; 
     28    int begin, end, n; 
    2929 
    3030    axisIBegin = axisDest->begin.getValue(); 
     
    3232    axisGlobalSize   = axisDest->n_glo.getValue(); 
    3333 
    34     zoom_begin = (this->zoom_begin.isEmpty()) ?  0 : this->zoom_begin.getValue() ; 
    35     zoom_size  = (this->zoom_size.isEmpty()) ?  axisGlobalSize : this->zoom_size.getValue() ; 
    36     zoom_end   = (this->zoom_end.isEmpty()) ?  (axisGlobalSize - 1) : this->zoom_end.getValue() ; 
     34    begin = (this->begin.isEmpty()) ?  0 : this->begin.getValue(); 
     35    n     = (this->n.isEmpty()) ?  axisGlobalSize : this->n.getValue(); 
     36    end   = begin+n-1; 
    3737 
    38     if (this->zoom_begin.isEmpty()) zoom_begin=zoom_end-zoom_size+1; 
    39     if (this->zoom_size.isEmpty()) zoom_size=zoom_end-zoom_begin+1; 
    40     if (this->zoom_end.isEmpty()) zoom_end=zoom_begin+zoom_size-1; 
    41  
    42     if (zoom_begin < 0 || zoom_begin > axisGlobalSize - 1 || zoom_end < 0 || zoom_end > axisGlobalSize - 1 
    43         || zoom_size < 1 || zoom_size > axisGlobalSize || zoom_begin > zoom_end) 
     38    if (begin < 0 || begin > axisGlobalSize - 1 || end < 0 || end > axisGlobalSize - 1 
     39        || n < 1 || n > axisGlobalSize || begin > end) 
    4440      ERROR("CZoomAxis::checkValid(CAxis* axisDest)", 
    45             << "One or more attributes among 'zoom_begin' (" << zoom_begin << "), 'zoom_end' (" << zoom_end << "), 'zoom_size' (" << zoom_size << ") " 
     41            << "One or more attributes among 'begin' (" << begin << "), 'end' (" << end << "), 'n' (" << n << ") " 
    4642            << "of axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified"); 
    4743 
    48     this->zoom_begin.setValue(zoom_begin) ; 
    49     this->zoom_end.setValue(zoom_end) ; 
    50     this->zoom_size.setValue(zoom_size) ; 
     44    this->begin.setValue(begin); 
     45    this->n.setValue(n); 
    5146 
    5247  } 
Note: See TracChangeset for help on using the changeset viewer.