Ignore:
Timestamp:
11/23/18 14:48:14 (21 months ago)
Author:
oabramkina
Message:

Dev: adding exception handling.

To activate it, compilation flag -DXIOS_EXCEPTION should be added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/array_new.hpp

    r1290 r1612  
    532532      virtual void fromString(const string& str) { istringstream iss(str); iss >> *this; initialized = true; } 
    533533      virtual string toString(void) const { ostringstream oss; oss << *this; return oss.str(); } 
     534 
     535      virtual string dump(void) const 
     536      { 
     537        ostringstream oss; 
     538        oss << this->shape()<<" "; 
     539        if (this->shape().numElements() == 1 && this->shape().dataFirst()[0] == 1) 
     540          oss << this->dataFirst()[0]; 
     541        else 
     542          oss << this->dataFirst()[0] <<" ... "<< this->dataFirst()[this->numElements()-1]; 
     543        return oss.str(); 
     544      } 
     545 
    534546      virtual void reset(void) { this->free(); initialized = false; } 
    535547      virtual bool isEmpty(void) const { return !initialized; } 
Note: See TracChangeset for help on using the changeset viewer.