Incorporating Swig interface: library changes. Origin: VulaSHAKA project

This commit is contained in:
Hrvoje Jasak 2010-10-15 19:55:43 +01:00
parent 0a263adf4b
commit f9f34b6985
15 changed files with 56 additions and 8 deletions

View file

@ -417,6 +417,7 @@ public:
// IOstream Operator
#ifndef SWIG
friend Istream& operator>> <T, Key, Hash>
(
Istream&,
@ -428,6 +429,7 @@ public:
Ostream&,
const HashTable<T, Key, Hash>&
);
#endif
private:

View file

@ -208,6 +208,7 @@ public:
// IOstream operators
#ifndef SWIG
// Write DynamicList to Ostream.
friend Ostream& operator<< <T, SizeInc, SizeMult, SizeDiv>
(
@ -221,6 +222,7 @@ public:
Istream&,
DynamicList<T, SizeInc, SizeMult, SizeDiv>&
);
#endif
};

View file

@ -71,8 +71,11 @@ template<class T> class SLList;
template<class T, unsigned Size>
class FixedList
{
#ifndef SWIG
//- Size must be positive (non-zero) and also fit as a signed value
StaticAssert(Size && Size <= INT_MAX);
#endif
// Private data
@ -331,6 +334,8 @@ public:
// IOstream operators
//- Read List from Istream, discarding contents of existing List.
#ifndef SWIG
friend Istream& operator>> <T, Size>
(Istream&, FixedList<T, Size>&);
@ -340,6 +345,7 @@ public:
Ostream&,
const FixedList<T, Size>&
);
#endif
};

View file

@ -232,9 +232,10 @@ public:
// Istream operator
#ifndef SWIG
//- Read List from Istream, discarding contents of existing List.
friend Istream& operator>> <T>
(Istream&, List<T>&);
friend Istream& operator>> <T>(Istream&, List<T>&);
#endif
};

View file

@ -295,11 +295,13 @@ public:
// IOstream operator
#ifndef SWIG
//- Read List from Istream, discarding contents of existing List.
friend Istream& operator>> <T>(Istream&, PtrList<T>&);
// Write List to Ostream.
friend Ostream& operator<< <T>(Ostream&, const PtrList<T>&);
#endif
};

View file

@ -321,13 +321,16 @@ public:
// Ostream operator
// Write UList to Ostream.
#ifndef SWIG
friend Ostream& operator<< <T>
(
Ostream&,
const UList<T>&
);
#endif
};
template<class T>
void sort(UList<T>&);

View file

@ -53,8 +53,11 @@ class NamedEnum
:
public HashTable<int>
{
#ifndef SWIG
//- nEnum must be positive (non-zero)
StaticAssert(nEnum > 0);
#endif
// Private Member Functions

View file

@ -50,7 +50,11 @@ namespace Foam
class IOobjectList
:
#ifndef SWIG
public HashPtrTable<IOobject>
#else
public HashPtrTable<IOobject, word, string_hash>
#endif
{
// Private Member Functions

View file

@ -209,6 +209,8 @@ public:
//- A templated class for holding compound tokens
#ifndef SWIG
template<class T>
class Compound
:
@ -235,7 +237,7 @@ public:
operator<<(os, static_cast<const T&>(*this));
}
};
#endif
//- Static undefined token
static token undefinedToken;

View file

@ -51,7 +51,11 @@ namespace Foam
class objectRegistry
:
public regIOobject,
#ifndef SWIG
public HashTable<regIOobject*>
#else
public HashTable<regIOobject*, word, string_hash>
#endif
{
// Private Data

View file

@ -174,11 +174,13 @@ public:
// IOstream operators
#ifndef SWIG
friend Istream& operator>> <Type>
(Istream&, dimensioned<Type>&);
friend Ostream& operator<< <Type>
(Ostream&, const dimensioned<Type>&);
#endif
};

View file

@ -162,10 +162,13 @@ public:
);
//- Construct by transferring the DimensionedField
#ifndef SWIG
DimensionedField
(
const Xfer<DimensionedField<Type, GeoMesh> >&
);
#endif
//- Construct as copy of tmp<DimensionedField> deleting argument
# ifdef ConstructFromTmp
@ -198,11 +201,13 @@ public:
);
//- Construct by transferring the DimensionedField with a new name
#ifndef SWIG
DimensionedField
(
const word& newName,
const Xfer<DimensionedField<Type, GeoMesh> >&
);
#endif
//- Construct as copy resetting name
# ifdef ConstructFromTmp
@ -309,6 +314,7 @@ public:
// Ostream Operators
#ifndef SWIG
friend Ostream& operator<< <Type, GeoMesh>
(
Ostream&,
@ -320,6 +326,7 @@ public:
Ostream&,
const tmp<DimensionedField<Type, GeoMesh> >&
);
#endif
};

View file

@ -189,6 +189,7 @@ public:
// IOstream operators
#ifndef SWIG
friend Ostream& operator<< <Field, Type>
(
Ostream&,
@ -200,6 +201,7 @@ public:
Ostream&,
const tmp<FieldField<Field, Type> >&
);
#endif
};

View file

@ -339,11 +339,13 @@ public:
// IOstream operators
#ifndef SWIG
friend Ostream& operator<< <Type>
(Ostream&, const Field<Type>&);
friend Ostream& operator<< <Type>
(Ostream&, const tmp<Field<Type> >&);
#endif
};

View file

@ -296,7 +296,8 @@ public:
const word& patchFieldType=PatchField<Type>::calculatedType()
);
//- Constructor given IOobject, mesh, dimensioned<Type> and patch types.
//- Constructor given IOobject, mesh, dimensioned<Type>
// and patch types.
GeometricField
(
const IOobject&,
@ -306,6 +307,8 @@ public:
);
//- Constructor from components
#if ( !defined(SWIG) || (SWIG_VERSION > 0x010340) )
GeometricField
(
const IOobject&,
@ -314,6 +317,7 @@ public:
const Field<Type>&,
const PtrList<PatchField<Type> >&
);
#endif
//- Construct and read given IOobject
GeometricField
@ -345,12 +349,12 @@ public:
);
//- Construct as copy of tmp<GeometricField> deleting argument
#ifdef ConstructFromTmp
# ifdef ConstructFromTmp
GeometricField
(
const tmp<GeometricField<Type, PatchField, GeoMesh> >&
);
#endif
# endif
//- Construct as copy resetting IO parameters
GeometricField
@ -367,13 +371,13 @@ public:
);
//- Construct as copy resetting name
#ifdef ConstructFromTmp
# ifdef ConstructFromTmp
GeometricField
(
const word& newName,
const tmp<GeometricField<Type, PatchField, GeoMesh> >&
);
#endif
# endif
//- Construct as copy resetting IO parameters and patch type
GeometricField
@ -547,6 +551,7 @@ public:
// Ostream operators
#ifndef SWIG
friend Ostream& operator<< <Type, PatchField, GeoMesh>
(
Ostream&,
@ -558,6 +563,7 @@ public:
Ostream&,
const tmp<GeometricField<Type, PatchField, GeoMesh> >&
);
#endif
};