+// Copyright (C) 2006-2015 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
#ifndef __YACSANY_HXX__
#define __YACSANY_HXX__
+#include "YACSlibEngineExport.hxx"
#include "RefCounter.hxx"
#include "Exception.hxx"
#include "SharedPtr.hxx"
class TypeCodeStruct;
typedef void (*Deallocator)(void *);
- class StringOnHeap
+ class YACSLIBENGINE_EXPORT StringOnHeap
{
friend class Any;
friend class AtomAny;
* \brief: Interface for management of storage of data formated dynamically in its TypeCode.
* Warning virtual inheritance on Any daughter classes NOT supported.
*/
- class Any : public RefCounter
+ class YACSLIBENGINE_EXPORT Any : public RefCounter
{
friend class SeqAlloc;
friend class ArrayAny;
virtual std::string getStringValue() const throw(Exception) = 0;
//
protected:
+#ifndef SWIG
virtual ~Any();
+#endif
Any(TypeCode* type);
Any(const Any& other);
virtual void putMyReprAtPlace(char *data) const = 0;
- static AnyPtr buildAnyFromCoarseData(char *data, TypeCode* type); //Factory Method
+ //static AnyPtr buildAnyFromCoarseData(char *data, TypeCode* type); //Factory Method
+ static bool IsNull(char *data);
protected:
TypeCode* _type;
};
typedef SharedPtr<AtomAny> AtomAnyPtr;
- class AtomAny : public Any
+ class YACSLIBENGINE_EXPORT AtomAny : public Any
{
friend class TypeCode;
ValueContainer _value;
};
- class SeqAlloc
+ class YACSLIBENGINE_EXPORT SeqAlloc
{
friend class SequenceAny;
void destroy(char *pt, const TypeCode *tc);
void deallocate(char *pt);
unsigned int size() const;
+ std::vector<unsigned int> getSetItems() const;
+ public:
+ static const char DFT_CHAR_VAR;
};
- class ComposedAny : public Any
+ class YACSLIBENGINE_EXPORT ComposedAny : public Any
{
public:
virtual void setEltAtRank(int i, const Any *elem) throw(Exception) = 0;
typedef SharedPtr<SequenceAny> SequenceAnyPtr;
- class SequenceAny : public ComposedAny
+ class YACSLIBENGINE_EXPORT SequenceAny : public ComposedAny
{
friend class TypeCodeSeq;
public:
static SequenceAny *New(const TypeCode *typeOfContent, unsigned lgth);
template<class T>
static SequenceAny *New(T *val, unsigned int lgth, Deallocator deAlloc);
+ std::vector<unsigned int> getSetItems() const { return _alloc.getSetItems(); }
+ SequenceAny *removeUnsetItemsFromThis() const;
protected:
void putMyReprAtPlace(char *data) const;
static void putReprAtPlace(char *data, const char *src, const TypeCode *type, bool deepCpy);
typedef SharedPtr<ArrayAny> ArrayAnyPtr;
- class ArrayAny : public ComposedAny
+ class YACSLIBENGINE_EXPORT ArrayAny : public ComposedAny
{
friend class TypeCodeArray;
public:
typedef SharedPtr<StructAny> StructAnyPtr;
- class StructAny : public ComposedAny
+ class YACSLIBENGINE_EXPORT StructAny : public ComposedAny
{
friend class TypeCodeStruct;
public: