3 #include "TypeCode.hxx"
4 #include "InvalidExtractionException.hxx"
8 using namespace YACS::ENGINE;
11 StringOnHeap::StringOnHeap(const char *val):_dealloc(0),_str(strdup(val))
15 StringOnHeap::StringOnHeap(const std::string& val):_dealloc(0),_str(strdup(val.c_str()))
20 * \Note : no copy is performed if a deallocator is given.
21 * \param val : String in C format that is NOT copied if
23 * \param deAlloc : pointer on function to deallocate val after
26 StringOnHeap::StringOnHeap(char *val, Deallocator deAlloc):_dealloc(deAlloc)
34 bool StringOnHeap::operator ==(const StringOnHeap& other) const
36 return strcmp(_str, other._str)==0;
39 StringOnHeap *StringOnHeap::deepCopy() const
41 return new StringOnHeap(_str);
44 StringOnHeap::~StringOnHeap()
52 Any::Any(TypeCode* type):_type(type)
57 Any::Any(const Any& other):_type(other._type)
67 AtomAny::AtomAny(int val):Any(Runtime::_tc_int)
72 AtomAny::AtomAny(bool val):Any(Runtime::_tc_bool)
77 AtomAny::AtomAny(double val):Any(Runtime::_tc_double)
82 AtomAny::AtomAny(const char *val):Any(Runtime::_tc_string)
84 _value._s=new StringOnHeap(val);
87 AtomAny::AtomAny(const std::string& val):Any(Runtime::_tc_string)
89 _value._s=new StringOnHeap(val);
92 AtomAny::AtomAny(const AtomAny& other):Any(other)
94 if(_type->isA(Runtime::_tc_string))
96 StringOnHeap *cpy=(other._value._s)->deepCopy();
97 memcpy(&_value._s,&cpy,_type->getSizeInByteOfAnyReprInSeq());
99 else if(_type->isA(Runtime::_tc_double))
100 memcpy(&_value._d,&other._value._d,_type->getSizeInByteOfAnyReprInSeq());
101 else if(_type->isA(Runtime::_tc_int))
102 memcpy(&_value._i,&other._value._i,_type->getSizeInByteOfAnyReprInSeq());
103 else if(_type->isA(Runtime::_tc_bool))
104 memcpy(&_value._b,&other._value._b,_type->getSizeInByteOfAnyReprInSeq());
107 AtomAny::AtomAny(char *val, Deallocator deAlloc):Any(Runtime::_tc_string)
109 _value._s=new StringOnHeap(val,deAlloc);
112 AtomAny::AtomAny(char *data, TypeCode* type):Any(type)
114 if(type->isA(Runtime::_tc_string))
116 void **tmp=(void **)data;
117 StringOnHeap *cpy=((StringOnHeap *)(*tmp))->deepCopy();
118 memcpy(&_value._s,&cpy,type->getSizeInByteOfAnyReprInSeq());
120 else if(type->isA(Runtime::_tc_double))
121 memcpy(&_value._d,data,type->getSizeInByteOfAnyReprInSeq());
122 else if(type->isA(Runtime::_tc_int))
123 memcpy(&_value._i,data,type->getSizeInByteOfAnyReprInSeq());
124 else if(type->isA(Runtime::_tc_bool))
125 memcpy(&_value._b,data,type->getSizeInByteOfAnyReprInSeq());
128 Any *AtomAny::clone() const
130 return new AtomAny(*this);
133 AtomAny *AtomAny::New(char *val,Deallocator dealloc)
135 return new AtomAny(val,dealloc);
138 AnyPtr AtomAny::operator[](int i) const
140 throw InvalidExtractionException(_type->kind(),Sequence);
143 bool AtomAny::operator ==(const Any& other) const
145 if(!_type->isA(other.getType()))
147 const AtomAny& otherC=(const AtomAny&) other;//cast granted due to previous lines
148 if(_type->isA(Runtime::_tc_double))
149 return _value._d==otherC._value._d;
150 else if(_type->isA(Runtime::_tc_int))
151 return _value._i==otherC._value._i;
152 else if(_type->isA(Runtime::_tc_bool))
153 return _value._b==otherC._value._b;
154 else if(_type->isA(Runtime::_tc_string))
155 return (*_value._s)==*(otherC._value._s);
160 int AtomAny::getIntValue() const throw(Exception)
162 if(_type->isA(Runtime::_tc_int))
165 throw Exception("Value is not an Int");
168 bool AtomAny::getBoolValue() const throw(Exception)
170 if(_type->isA(Runtime::_tc_bool))
173 throw Exception("Value is not a Bool");
176 double AtomAny::getDoubleValue() const throw(Exception)
178 if(_type->isA(Runtime::_tc_double))
181 throw Exception("Value is not a Double");
184 std::string AtomAny::getStringValue() const throw(Exception)
186 if(_type->isA(Runtime::_tc_string))
187 return string(_value._s->cStr());
189 throw Exception("Value is not a String");
193 * \note : This method put in data its zipped recursive content in data.
194 * The ownership of the recursive content is tranfered to data.
195 * So this owns nothing and its counter fall by 1.
196 * For memory space minimal use, not all of '*this' is pushed at data location.
197 * \param data : already allocated memory zone where to put compressed content of 'this'
199 void AtomAny::putMyReprAtPlace(char *data) const
201 if(_type->isA(Runtime::_tc_string))
203 StringOnHeap *tmp=_value._s->deepCopy();
204 memcpy(data,&tmp,_type->getSizeInByteOfAnyReprInSeq());
206 else if(_type->isA(Runtime::_tc_double))
207 memcpy(data,&_value._d,_type->getSizeInByteOfAnyReprInSeq());
208 else if(_type->isA(Runtime::_tc_int))
209 memcpy(data,&_value._i,_type->getSizeInByteOfAnyReprInSeq());
210 else if(_type->isA(Runtime::_tc_bool))
211 memcpy(data,&_value._b,_type->getSizeInByteOfAnyReprInSeq());
215 * \note : This method put in data its zipped recursive content in data.
216 * The ownership of the recursive content is tranfered to data.
217 * So this owns nothing and its counter fall by 1.
218 * For memory space minimal use, not all of '*this' is pushed at data location.
219 * 'deepCpy' param is not used here because by definition of AtomAny deep copy is performed.
220 * \param data : already allocated memory zone where to put compressed content of 'this'
222 void AtomAny::putReprAtPlace(char *data, const char *src, const TypeCode *type, bool deepCpy)
224 if(type->isA(Runtime::_tc_string))
226 void **tmp1=(void **)src;
227 StringOnHeap *tmp=((const StringOnHeap *)(*tmp1))->deepCopy();
228 memcpy(data,&tmp,type->getSizeInByteOfAnyReprInSeq());
230 else if(type->isA(Runtime::_tc_double))
231 memcpy(data,src,type->getSizeInByteOfAnyReprInSeq());
232 else if(type->isA(Runtime::_tc_int))
233 memcpy(data,src,type->getSizeInByteOfAnyReprInSeq());
234 else if(type->isA(Runtime::_tc_bool))
235 memcpy(data,src,type->getSizeInByteOfAnyReprInSeq());
239 * \note : Opposite method of putMyReprAtPlace. But static because due to data compression
242 void AtomAny::destroyReprAtPlace(char *data, const TypeCode *type)
244 DynType typ=type->kind();
247 void **tmp=(void **)data;
248 delete ((StringOnHeap *)(*tmp));
252 AnyPtr AtomAny::getOrBuildFromData(char *data, const TypeCode *type)
255 ret=new AtomAny(data,(TypeCode *)type);
259 bool AtomAny::takeInChargeStorageOf(TypeCode *type)
261 DynType typ=type->kind();
262 return (typ==Double || typ==Int || typ==Bool || typ==String);
267 if(_type->isA(Runtime::_tc_string))
271 ComposedAny::ComposedAny(const ComposedAny& other):Any(other)
275 ComposedAny::ComposedAny(TypeCode* type):Any(type)
280 int ComposedAny::getIntValue() const throw(Exception)
282 throw InvalidExtractionException(_type->kind(),Runtime::_tc_int->kind());
285 bool ComposedAny::getBoolValue() const throw(Exception)
287 throw InvalidExtractionException(_type->kind(),Runtime::_tc_bool->kind());
290 double ComposedAny::getDoubleValue() const throw(Exception)
292 throw InvalidExtractionException(_type->kind(),Runtime::_tc_double->kind());
295 std::string ComposedAny::getStringValue() const throw(Exception)
297 throw InvalidExtractionException(_type->kind(),Runtime::_tc_string->kind());
300 SeqAlloc::SeqAlloc(const SeqAlloc& other):_sizeOf1Elm(other._sizeOf1Elm),_notStdDeAlloc(0),
301 _start(0),_finish(0),_endOfStorage(0)
303 _start=allocate(other._finish-other._start);
304 _finish=_start+(other._finish-other._start);
305 _endOfStorage=_finish;
308 SeqAlloc::SeqAlloc(unsigned int sizeOf1Elm):_sizeOf1Elm(sizeOf1Elm),_notStdDeAlloc(0),
309 _start(0),_finish(0),_endOfStorage(0)
313 SeqAlloc::~SeqAlloc()
318 void SeqAlloc::clear()
327 * \note : This method is exclusively reserved for arrays of C++ built-in types because no
328 * constructor is applied atomically.
330 void SeqAlloc::initCoarseMemory(char *mem, unsigned int size, Deallocator dealloc)
332 unsigned sizeInByte=size*_sizeOf1Elm;
335 _notStdDeAlloc=dealloc;
340 _start=allocate(sizeInByte);
342 memcpy(_start,mem,sizeInByte);
345 for(unsigned int i=0;i<sizeInByte;i++) _start[i]=0;
348 _finish=_start+sizeInByte;
349 _endOfStorage=_finish;
352 void SeqAlloc::construct(char *pt, const Any *val)
354 val->putMyReprAtPlace(pt);
358 * \note: This performs the placement new or zip info into pt.
359 * \param val : the source from which the construction will be performed.
360 * \param deepCpy : If true in pt place a deep copy pointed by val will be put.
362 void SeqAlloc::construct(char *pt, const char *val, const TypeCode *tc, bool deepCpy)
364 tc->putReprAtPlace(pt,val,deepCpy);
367 char *SeqAlloc::allocate(unsigned int nbOfByte)
370 return (char *)::operator new(nbOfByte);
375 // pt is not permitted to be a null pointer.
376 void SeqAlloc::deallocate(char *pt)
381 ::operator delete(pt);
390 void SeqAlloc::destroy(char *pt, const TypeCode *tc)
392 tc->destroyZippedAny(pt);
395 unsigned int SeqAlloc::size() const
397 return (_finish-_start)/_sizeOf1Elm;
400 void SequenceAny::clear()
402 for (char *cur=_alloc._start;cur!=_alloc._finish;cur+=_alloc._sizeOf1Elm)
403 _alloc.destroy(cur,_type->contentType());
407 void SequenceAny::popBack()
409 _alloc._finish-=_alloc._sizeOf1Elm;
410 _alloc.destroy(_alloc._finish,_type->contentType());
413 void SequenceAny::pushBack(const Any* elem)
415 if(!elem->_type->isA(_type->contentType()))
416 throw InvalidExtractionException(elem->_type->kind(),_type->contentType()->kind());
417 if(_alloc._finish != _alloc._endOfStorage)
419 _alloc.construct(_alloc._finish, elem);
420 _alloc._finish+=_alloc._sizeOf1Elm;
423 realloc(_alloc._finish, elem);
426 bool SequenceAny::operator ==(const Any& other) const
428 if(!_type->isA(other.getType()))
430 const SequenceAny& otherC=(const SequenceAny&) other;//cast granted due to previous lines
431 if(size()!=otherC.size())
433 for(unsigned i=0;i<size();i++)
434 if(!((*(*this)[i])==(*otherC[i])))
439 void SequenceAny::setEltAtRank(int i, const Any *elem)
441 _alloc.destroy(_alloc._start+i*_alloc._sizeOf1Elm,_type->contentType());
442 _alloc.construct(_alloc._start+i*_alloc._sizeOf1Elm,elem);
445 AnyPtr SequenceAny::operator[](int i) const
447 return _type->contentType()->getOrBuildAnyFromZippedData(_alloc._start+i*_alloc._sizeOf1Elm);
451 * \note : Contrary to AtomAny 'this' (ref) is put in data NOT a deep copy.
452 * \param data : already allocated memory zone where to put address of 'this'
454 void SequenceAny::putMyReprAtPlace(char *data) const
456 const void *tmp=(const void *)this;
457 memcpy(data,&tmp,_type->getSizeInByteOfAnyReprInSeq());
458 const void **tmp2=(const void **) data;
459 ((SequenceAny *)(*tmp2))->incrRef();
460 //::new((SequenceAny *)data) SequenceAny((SequenceAny&) (*this));
463 void SequenceAny::putReprAtPlace(char *data, const char *src, const TypeCode *type, bool deepCpy)
465 void **tmp2=(void **) src;
468 ((SequenceAny *)(*tmp2))->incrRef();
469 memcpy(data,src,type->getSizeInByteOfAnyReprInSeq());
473 SequenceAny *cpy=new SequenceAny(*((SequenceAny *)(*tmp2)));
474 memcpy(data,&cpy,type->getSizeInByteOfAnyReprInSeq());
476 //::new((SequenceAny *)data) SequenceAny((SequenceAny&) (*this));
479 void SequenceAny::destroyReprAtPlace(char *data, const TypeCode *type)
481 void **tmp=(void **) data;
483 ((SequenceAny *)(*tmp))->decrRef();
484 //((SequenceAny *)data)->~SequenceAny();
487 AnyPtr SequenceAny::getOrBuildFromData(char *data, const TypeCode *type)
489 void **tmp=(void **) data;
490 ((SequenceAny *) (*tmp))->incrRef();
491 return AnyPtr((SequenceAny *)(*tmp));
494 Any *SequenceAny::clone() const
496 return new SequenceAny(*this);
499 SequenceAny *SequenceAny::New(const TypeCode *typeOfContent)
501 if(typeOfContent->kind() == Objref)
503 //In case of Objref, use a sequence of string
504 return new SequenceAny(Runtime::_tc_string);
507 return new SequenceAny(typeOfContent);
510 SequenceAny *SequenceAny::New(const TypeCode *typeOfContent, unsigned lgth)
512 if(typeOfContent->kind() == Objref)
514 //In case of Objref, use a sequence of string
515 return new SequenceAny(Runtime::_tc_string,lgth);
518 return new SequenceAny(typeOfContent,lgth);
521 bool SequenceAny::takeInChargeStorageOf(TypeCode *type)
523 DynType typ=type->kind();
524 return (typ==Sequence);
527 SequenceAny::SequenceAny(const SequenceAny& other):ComposedAny(other),_alloc(other._alloc)
529 const char *srcCur=other._alloc._start;
530 for(char *cur=_alloc._start;srcCur != other._alloc._finish; srcCur+=_alloc._sizeOf1Elm, cur+=_alloc._sizeOf1Elm)
531 _alloc.construct(cur, srcCur, _type->contentType(),true);
534 SequenceAny::~SequenceAny()
536 for (char *cur=_alloc._start;cur!=_alloc._finish;cur+=_alloc._sizeOf1Elm)
537 _alloc.destroy(cur,_type->contentType());
541 * \param typeOfContent : typeCode of the type of elements stored in sequence.
543 SequenceAny::SequenceAny(const TypeCode *typeOfContent):ComposedAny(new TypeCodeSeq("","",typeOfContent)),
544 _alloc(typeOfContent->getSizeInByteOfAnyReprInSeq())
548 SequenceAny::SequenceAny(const TypeCode *typeOfContent, unsigned lgth):ComposedAny(new TypeCodeSeq("","",typeOfContent)),
549 _alloc(typeOfContent->getSizeInByteOfAnyReprInSeq())
551 _alloc.initCoarseMemory(0,lgth,0);
554 SequenceAny::SequenceAny(int *val, unsigned int lgth, Deallocator deAlloc):ComposedAny(new TypeCodeSeq("","",Runtime::_tc_int)),
555 _alloc(Runtime::_tc_int->getSizeInByteOfAnyReprInSeq())
557 _alloc.initCoarseMemory((char *)val,lgth,deAlloc);
560 SequenceAny::SequenceAny(bool *val, unsigned int lgth, Deallocator deAlloc):ComposedAny(new TypeCodeSeq("","",Runtime::_tc_bool)),
561 _alloc(Runtime::_tc_bool->getSizeInByteOfAnyReprInSeq())
563 _alloc.initCoarseMemory((char *)val,lgth,deAlloc);
566 SequenceAny::SequenceAny(double *val, unsigned int lgth, Deallocator deAlloc):ComposedAny(new TypeCodeSeq("","",Runtime::_tc_double)),
567 _alloc(Runtime::_tc_double->getSizeInByteOfAnyReprInSeq())
569 _alloc.initCoarseMemory((char *)val,lgth,deAlloc);
572 SequenceAny::SequenceAny(const std::vector<int>& val):ComposedAny(new TypeCodeSeq("","",Runtime::_tc_int)),
573 _alloc(Runtime::_tc_int->getSizeInByteOfAnyReprInSeq())
575 _alloc.initCoarseMemory((char *)&val[0],val.size(),0);
578 SequenceAny::SequenceAny(const std::vector<bool>& val):ComposedAny(new TypeCodeSeq("","",Runtime::_tc_bool)),
579 _alloc(Runtime::_tc_bool->getSizeInByteOfAnyReprInSeq())
581 for(vector<bool>::const_iterator iter=val.begin();iter!=val.end();iter++)
583 AtomAnyPtr tmp=AtomAny::New(*iter);
588 SequenceAny::SequenceAny(const std::vector<double>& val):ComposedAny(new TypeCodeSeq("","",Runtime::_tc_double)),
589 _alloc(Runtime::_tc_double->getSizeInByteOfAnyReprInSeq())
591 _alloc.initCoarseMemory((char *)&val[0],val.size(),0);
594 SequenceAny::SequenceAny(const std::vector<std::string>& val):ComposedAny(new TypeCodeSeq("","",Runtime::_tc_string)),
595 _alloc(Runtime::_tc_string->getSizeInByteOfAnyReprInSeq())
597 for(vector<string>::const_iterator iter=val.begin();iter!=val.end();iter++)
599 AtomAnyPtr tmp=AtomAny::New(*iter);
604 void SequenceAny::realloc(char *endOfCurrentAllocated, const Any *elem)
606 unsigned int oldSize=_alloc._finish-_alloc._start;
607 unsigned int newSize = oldSize != 0 ? 2 * oldSize : _alloc._sizeOf1Elm;
608 char *newStart=_alloc.allocate(newSize);
610 char *newFinish=performCpy(_alloc._start, endOfCurrentAllocated,newStart);
611 _alloc.construct(newFinish, elem);
612 newFinish+=_alloc._sizeOf1Elm;
613 newFinish=performCpy(endOfCurrentAllocated, _alloc._finish, newFinish);
615 for (char *cur=_alloc._start;cur!=_alloc._finish;cur+=_alloc._sizeOf1Elm)
616 _alloc.destroy(cur,_type->contentType());
617 _alloc.deallocate(_alloc._start);
618 _alloc._start = newStart;
619 _alloc._finish = newFinish;
620 _alloc._endOfStorage=newStart+newSize;
623 char *SequenceAny::performCpy(char *srcStart, char *srcFinish, char *destStart)
626 for (;srcStart != srcFinish; srcStart+=_alloc._sizeOf1Elm, cur+=_alloc._sizeOf1Elm)
627 _alloc.construct(cur, srcStart, _type->contentType(),false);
631 ArrayAny::~ArrayAny()
636 ArrayAny::ArrayAny(char *data, TypeCodeArray * type):ComposedAny(type),_data(0)
638 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
639 const TypeCode *subType=_type->contentType();
640 unsigned sizePerContent=subType->getSizeInByteOfAnyReprInSeq();
641 for(unsigned i=0;i<type->getStaticLgth();i++)
642 subType->putReprAtPlace(_data+i*sizePerContent,data+i*sizePerContent,true);
645 ArrayAny::ArrayAny(const ArrayAny& other):ComposedAny(other)
647 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
648 const TypeCode *subType=_type->contentType();
649 unsigned sizePerContent=subType->getSizeInByteOfAnyReprInSeq();
650 for(unsigned i=0;i<((TypeCodeArray *)_type)->getStaticLgth();i++)
651 subType->putReprAtPlace(_data+i*sizePerContent,other._data+i*sizePerContent,true);
654 ArrayAny::ArrayAny(const int *val, unsigned int lgth):ComposedAny(new TypeCodeArray("","",Runtime::_tc_int,lgth)),
657 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
658 memcpy(_data,val,_type->getSizeInByteOfAnyReprInSeq());
661 ArrayAny::ArrayAny(const bool *val, unsigned int lgth):ComposedAny(new TypeCodeArray("","",Runtime::_tc_bool,lgth)),
664 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
665 memcpy(_data,val,_type->getSizeInByteOfAnyReprInSeq());
668 ArrayAny::ArrayAny(const double *val, unsigned int lgth):ComposedAny(new TypeCodeArray("","",Runtime::_tc_double,lgth)),
671 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
672 memcpy(_data,val,_type->getSizeInByteOfAnyReprInSeq());
675 ArrayAny::ArrayAny(const std::vector<int>& val):ComposedAny(new TypeCodeArray("","",Runtime::_tc_int,val.size())),
678 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
679 memcpy(_data,&val[0],_type->getSizeInByteOfAnyReprInSeq());
682 ArrayAny::ArrayAny(const std::vector<double>& val):ComposedAny(new TypeCodeArray("","",Runtime::_tc_double,val.size())),
685 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
686 memcpy(_data,&val[0],_type->getSizeInByteOfAnyReprInSeq());
689 ArrayAny::ArrayAny(const std::vector<std::string>& val):ComposedAny(new TypeCodeArray("","",Runtime::_tc_string,val.size())),
692 _data=new char[_type->getSizeInByteOfAnyReprInSeq()];
694 const TypeCode *subType=_type->contentType();
695 unsigned sizePerContent=subType->getSizeInByteOfAnyReprInSeq();
696 for(vector<std::string>::const_iterator iter=val.begin();iter!=val.end();iter++,i++)
698 StringOnHeap *st=new StringOnHeap(*iter);
699 memcpy(_data+i*sizePerContent,&st,sizePerContent);
703 bool ArrayAny::operator ==(const Any& other) const
705 if(!_type->isA(other.getType()))
707 const ArrayAny& otherC=(const ArrayAny&) other;//cast granted due to previous lines
708 for(unsigned i=0;i<((const TypeCodeArray *)_type)->getStaticLgth();i++)
709 if(!((*(*this)[i])==(*otherC[i])))
714 AnyPtr ArrayAny::operator[](int i) const
716 const TypeCode *subType=_type->contentType();
717 unsigned sizePerContent=subType->getSizeInByteOfAnyReprInSeq();
718 if(i<0 || i>=((TypeCodeArray *)_type)->getStaticLgth())
719 throw Exception("Trying to access to an invalid index in an Any Tuple");
720 return _type->getOrBuildAnyFromZippedData(_data+i*sizePerContent);
723 Any *ArrayAny::clone() const
725 return new ArrayAny(*this);
728 void ArrayAny::putMyReprAtPlace(char *data) const
730 const TypeCode *subType=_type->contentType();
731 unsigned sizePerContent=subType->getSizeInByteOfAnyReprInSeq();
732 for(unsigned i=0;i<((const TypeCodeArray *)_type)->getStaticLgth();i++)
733 subType->putReprAtPlace(data+i*sizePerContent,_data+i*sizePerContent,false);
736 void ArrayAny::putReprAtPlace(char *data, const char *src, const TypeCodeArray *type, bool deepCpy)
738 const TypeCode *subType=type->contentType();
739 unsigned sizePerContent=subType->getSizeInByteOfAnyReprInSeq();
740 for(unsigned i=0;i<type->getStaticLgth();i++)
741 subType->putReprAtPlace(data+i*sizePerContent,src+i*sizePerContent,deepCpy);
744 void ArrayAny::destroyReprAtPlace(char *data, const TypeCodeArray *type)
746 const TypeCode *subType=type->contentType();
747 unsigned sizePerContent=subType->getSizeInByteOfAnyReprInSeq();
748 for(unsigned i=0;i<type->getStaticLgth();i++)
749 subType->destroyZippedAny(data+i*sizePerContent);
752 AnyPtr ArrayAny::getOrBuildFromData(char *data, const TypeCodeArray *type)
756 ret=new ArrayAny(data,(TypeCodeArray *)type);
760 bool ArrayAny::takeInChargeStorageOf(TypeCode *type)
762 DynType typ=type->kind();