X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingMemArray.hxx;h=ba49d508476d757d1fcb6bb943b4f7cd37c668bc;hb=8f2a28585bcf231a8f976f36b7fb1d2eed8801c2;hp=501cea75e7e63e29d8b7ebecb79a7982ba71ff5e;hpb=b607ffc713080a567fb90595118069ac18181e99;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 501cea75e..ba49d5084 100755 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -235,6 +235,13 @@ namespace MEDCoupling static MCAuto< typename Traits::ArrayTypeCh > NewFromArray(const T *arrBegin, const T *arrEnd); std::vector< MCAuto< typename Traits::ArrayTypeCh > > explodeComponents() const; // + void printForDebug(std::ostream& oss) const + { + this->checkAllocated(); + char comma[3] = {'\0',' ','\0'}; + std::for_each(this->begin(),this->end(),[&comma,&oss](const T& elt) { oss << comma << elt; comma[0]=','; } ); + oss << std::endl; + } std::size_t getHeapMemorySizeWithoutChildren() const; void updateTime() const { } // @@ -254,7 +261,8 @@ namespace MEDCoupling T getIJ(std::size_t tupleId, std::size_t compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } void setIJ(std::size_t tupleId, std::size_t compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; declareAsNew(); } void setIJSilent(std::size_t tupleId, std::size_t compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } - T *getPointer() { return _mem.getPointer(); declareAsNew(); } + T *getPointer() { declareAsNew(); return getPointerSilent(); } + T *getPointerSilent() { return _mem.getPointer(); } void pack() const; bool isAllocated() const override; void checkAllocated() const;