aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-07-20 14:00:44 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-18 15:21:20 -0300
commitb4c007c3ee9932b7a384b2b4fcdc8b4be2dfbad9 (patch)
treee106cc99a076d3c4677b6afb4857fcb36b1351f9 /tests/libsample
parentda5a88b3b53b4769e77eff1d48cc9a2c7152f6c2 (diff)
fixed tests exported symbols.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/abstract.h6
-rw-r--r--tests/libsample/blackbox.h4
-rw-r--r--tests/libsample/bucket.h4
-rw-r--r--tests/libsample/collector.h2
-rw-r--r--tests/libsample/complex.h8
-rw-r--r--tests/libsample/derived.h2
-rw-r--r--tests/libsample/echo.h2
-rw-r--r--tests/libsample/implicitconv.h6
-rw-r--r--tests/libsample/injectcode.h2
-rw-r--r--tests/libsample/listuser.h4
-rw-r--r--tests/libsample/mapuser.h4
-rw-r--r--tests/libsample/modifications.h30
-rw-r--r--tests/libsample/multiple_derived.h50
-rw-r--r--tests/libsample/noimplicitconversion.h10
-rw-r--r--tests/libsample/nondefaultctor.h12
-rw-r--r--tests/libsample/objecttype.h12
-rw-r--r--tests/libsample/objecttypelayout.h2
-rw-r--r--tests/libsample/objectview.h4
-rw-r--r--tests/libsample/oddbool.h10
-rw-r--r--tests/libsample/overload.h10
-rw-r--r--tests/libsample/overloadsort.h20
-rw-r--r--tests/libsample/pairuser.h4
-rw-r--r--tests/libsample/point.h12
-rw-r--r--tests/libsample/pointerholder.h4
-rw-r--r--tests/libsample/polygon.h2
-rw-r--r--tests/libsample/privatector.h6
-rw-r--r--tests/libsample/privatedtor.h8
-rw-r--r--tests/libsample/protected.h46
-rw-r--r--tests/libsample/reference.h10
-rw-r--r--tests/libsample/samplenamespace.h8
-rw-r--r--tests/libsample/size.h18
-rw-r--r--tests/libsample/sometime.h10
-rw-r--r--tests/libsample/str.h2
-rw-r--r--tests/libsample/strlist.h2
-rw-r--r--tests/libsample/voidholder.h6
35 files changed, 170 insertions, 172 deletions
diff --git a/tests/libsample/abstract.h b/tests/libsample/abstract.h
index 834a2f9b4..842435bcb 100644
--- a/tests/libsample/abstract.h
+++ b/tests/libsample/abstract.h
@@ -62,13 +62,13 @@ public:
Abstract(int id = -1);
virtual ~Abstract();
- int id() { return m_id; }
+ inline int id() { return m_id; }
// factory method
- static Abstract* createObject() { return 0; }
+ inline static Abstract* createObject() { return 0; }
// method that receives an Object Type
- static int getObjectId(Abstract* obj) { return obj->id(); }
+ inline static int getObjectId(Abstract* obj) { return obj->id(); }
virtual void pureVirtual() = 0;
virtual void* pureVirtualReturningVoidPtr() = 0;
diff --git a/tests/libsample/blackbox.h b/tests/libsample/blackbox.h
index bb156887b..344ff001d 100644
--- a/tests/libsample/blackbox.h
+++ b/tests/libsample/blackbox.h
@@ -60,8 +60,8 @@ public:
std::list<ObjectType*> objects();
std::list<Point*> points();
- void referenceToValuePointer(Point*&) {}
- void referenceToObjectPointer(ObjectType*&) {}
+ inline void referenceToValuePointer(Point*&) {}
+ inline void referenceToObjectPointer(ObjectType*&) {}
private:
ObjectTypeMap m_objects;
diff --git a/tests/libsample/bucket.h b/tests/libsample/bucket.h
index 7ea5428a5..c0ff388b7 100644
--- a/tests/libsample/bucket.h
+++ b/tests/libsample/bucket.h
@@ -49,11 +49,11 @@ public:
int pop();
bool empty();
void lock();
- bool locked() { return m_locked; }
+ inline bool locked() { return m_locked; }
void unlock();
virtual bool virtualBlockerMethod();
- bool callVirtualBlockerMethodButYouDontKnowThis() { return virtualBlockerMethod(); }
+ inline bool callVirtualBlockerMethodButYouDontKnowThis() { return virtualBlockerMethod(); }
private:
std::list<int> m_data;
diff --git a/tests/libsample/collector.h b/tests/libsample/collector.h
index e82280333..e0ee74149 100644
--- a/tests/libsample/collector.h
+++ b/tests/libsample/collector.h
@@ -63,7 +63,7 @@ private:
};
/* Helper for testing external operators */
-class LIBSAMPLE_API IntWrapper
+class IntWrapper
{
public:
IntWrapper(int x=0):value(x){}
diff --git a/tests/libsample/complex.h b/tests/libsample/complex.h
index 9ee2a4eeb..2441d3ae8 100644
--- a/tests/libsample/complex.h
+++ b/tests/libsample/complex.h
@@ -43,10 +43,10 @@ public:
Complex(double real = 0.0, double imag = 0.0);
~Complex() {}
- double real() const { return m_real; }
- void setReal(double real) { m_real = real; }
- double imag() const { return m_imag; }
- void setImaginary(double imag) { m_imag = imag; }
+ inline double real() const { return m_real; }
+ inline void setReal(double real) { m_real = real; }
+ inline double imag() const { return m_imag; }
+ inline void setImaginary(double imag) { m_imag = imag; }
Complex operator+(Complex& other);
diff --git a/tests/libsample/derived.h b/tests/libsample/derived.h
index 58c3b2109..e2e1dfa2a 100644
--- a/tests/libsample/derived.h
+++ b/tests/libsample/derived.h
@@ -84,7 +84,7 @@ public:
OtherOverloadedFuncEnum otherOverloaded(int a, int b, bool c, double d);
OtherOverloadedFuncEnum otherOverloaded(int a, double b);
- SomeInnerClass returnMyParameter(const SomeInnerClass& s) { return s; }
+ inline SomeInnerClass returnMyParameter(const SomeInnerClass& s) { return s; }
static Abstract* triggerImpossibleTypeDiscovery();
static Abstract* triggerAnotherImpossibleTypeDiscovery();
diff --git a/tests/libsample/echo.h b/tests/libsample/echo.h
index 139fb60a3..3c50f9842 100644
--- a/tests/libsample/echo.h
+++ b/tests/libsample/echo.h
@@ -39,7 +39,7 @@
class ObjectType;
-class LIBSAMPLE_API Echo
+class Echo
{
public:
Echo(){}
diff --git a/tests/libsample/implicitconv.h b/tests/libsample/implicitconv.h
index 28a61eac3..e7373b048 100644
--- a/tests/libsample/implicitconv.h
+++ b/tests/libsample/implicitconv.h
@@ -64,9 +64,9 @@ public:
ImplicitConv(double value, bool=true) : m_ctorEnum(CtorNone), m_value(value) {}
~ImplicitConv() {}
- CtorEnum ctorEnum() { return m_ctorEnum; }
- int objId() { return m_objId; }
- double value() { return m_value; }
+ inline CtorEnum ctorEnum() { return m_ctorEnum; }
+ inline int objId() { return m_objId; }
+ inline double value() { return m_value; }
static ImplicitConv implicitConvCommon(ImplicitConv implicit);
diff --git a/tests/libsample/injectcode.h b/tests/libsample/injectcode.h
index f22f3d5fa..e7c68cf9b 100644
--- a/tests/libsample/injectcode.h
+++ b/tests/libsample/injectcode.h
@@ -54,7 +54,7 @@ public:
const char* overloadedMethod(int arg0, bool arg1);
virtual int arrayMethod(int count, int* values) const;
- int callArrayMethod(int count, int *values) const { return arrayMethod(count, values); }
+ inline int callArrayMethod(int count, int *values) const { return arrayMethod(count, values); }
virtual const char* virtualMethod(int arg);
int sumArrayAndLength(int* values) const;
private:
diff --git a/tests/libsample/listuser.h b/tests/libsample/listuser.h
index 67dc95e44..6f04c2e57 100644
--- a/tests/libsample/listuser.h
+++ b/tests/libsample/listuser.h
@@ -60,8 +60,8 @@ public:
static void multiplyPointList(PointList& points, double multiplier);
- void setList(std::list<int> lst) { m_lst = lst; }
- std::list<int> getList() { return m_lst; }
+ inline void setList(std::list<int> lst) { m_lst = lst; }
+ inline std::list<int> getList() { return m_lst; }
private:
std::list<int> m_lst;
diff --git a/tests/libsample/mapuser.h b/tests/libsample/mapuser.h
index c963743ac..21bd226a9 100644
--- a/tests/libsample/mapuser.h
+++ b/tests/libsample/mapuser.h
@@ -54,8 +54,8 @@ public:
void showMap(std::map<std::string, int> mapping);
- void setMap(std::map<std::string, std::list<int> > map) { m_map = map; }
- std::map<std::string, std::list<int> > getMap() { return m_map; }
+ inline void setMap(std::map<std::string, std::list<int> > map) { m_map = map; }
+ inline std::map<std::string, std::list<int> > getMap() { return m_map; }
private:
std::map<std::string, std::list<int> > m_map;
diff --git a/tests/libsample/modifications.h b/tests/libsample/modifications.h
index d5c6d8ebf..64841d63a 100644
--- a/tests/libsample/modifications.h
+++ b/tests/libsample/modifications.h
@@ -56,26 +56,26 @@ public:
// those overloaded methods should be heavily modified
// to push the overload decisor to its limits
- OverloadedModFunc overloaded(int a0, bool b0, int c0, double d0) { return Overloaded_ibid; }
- OverloadedModFunc overloaded(int a1, bool b1, int c1, bool d1) { return Overloaded_ibib; }
- OverloadedModFunc overloaded(int a2, bool b2, int c2, Point d2) { return Overloaded_ibiP; }
- OverloadedModFunc overloaded(int a3, bool b3, int c3 = 123, int d3 = 456) { return Overloaded_ibii; }
- OverloadedModFunc overloaded(int a4, bool b4, Point c4, Point d4) { return Overloaded_ibPP; }
+ inline OverloadedModFunc overloaded(int a0, bool b0, int c0, double d0) { return Overloaded_ibid; }
+ inline OverloadedModFunc overloaded(int a1, bool b1, int c1, bool d1) { return Overloaded_ibib; }
+ inline OverloadedModFunc overloaded(int a2, bool b2, int c2, Point d2) { return Overloaded_ibiP; }
+ inline OverloadedModFunc overloaded(int a3, bool b3, int c3 = 123, int d3 = 456) { return Overloaded_ibii; }
+ inline OverloadedModFunc overloaded(int a4, bool b4, Point c4, Point d4) { return Overloaded_ibPP; }
- void argRemoval0(int a0, bool a1, int a2 = 123, int a3 = 456) {}
- void argRemoval0(int a0, bool a1, int a2, bool a3) {}
+ inline void argRemoval0(int a0, bool a1, int a2 = 123, int a3 = 456) {}
+ inline void argRemoval0(int a0, bool a1, int a2, bool a3) {}
- void argRemoval1(int a0, bool a1, Point a2 = Point(1, 2), Point a3 = Point(3, 4), int a4 = 333) {}
- void argRemoval1(int a0, bool a1, int a2, bool a3) {}
+ inline void argRemoval1(int a0, bool a1, Point a2 = Point(1, 2), Point a3 = Point(3, 4), int a4 = 333) {}
+ inline void argRemoval1(int a0, bool a1, int a2, bool a3) {}
- void argRemoval2(int a0, bool a1, Point a2 = Point(1, 2), Point a3 = Point(3, 4), int a4 = 333) {}
+ inline void argRemoval2(int a0, bool a1, Point a2 = Point(1, 2), Point a3 = Point(3, 4), int a4 = 333) {}
- void argRemoval3(int a0, Point a1 = Point(1, 2), bool a2 = true, Point a3 = Point(3, 4), int a4 = 333) {}
+ inline void argRemoval3(int a0, Point a1 = Point(1, 2), bool a2 = true, Point a3 = Point(3, 4), int a4 = 333) {}
- void argRemoval4(int a0, Point a1, bool a2, Point a3 = Point(3, 4), int a4 = 333) {}
+ inline void argRemoval4(int a0, Point a1, bool a2, Point a3 = Point(3, 4), int a4 = 333) {}
- void argRemoval5(int a0, bool a1, Point a2 = Point(1, 2), Point a3 = Point(3, 4), int a4 = 333) {}
- void argRemoval5(int a0, bool a1, int a2, bool a3) {}
+ inline void argRemoval5(int a0, bool a1, Point a2 = Point(1, 2), Point a3 = Point(3, 4), int a4 = 333) {}
+ inline void argRemoval5(int a0, bool a1, int a2, bool a3) {}
// 'ok' must be removed and the return value will be changed
// to a tuple (PyObject*) containing the expected result plus
@@ -113,7 +113,7 @@ public:
AbstractModifications() {}
virtual ~AbstractModifications() {}
- bool invert(bool value) { return !value; }
+ inline bool invert(bool value) { return !value; }
// completely remove this method in Python
virtual void pointlessPureVirtualMethod() = 0;
diff --git a/tests/libsample/multiple_derived.h b/tests/libsample/multiple_derived.h
index 576b263e0..ffbe5feb4 100644
--- a/tests/libsample/multiple_derived.h
+++ b/tests/libsample/multiple_derived.h
@@ -37,7 +37,7 @@
#include "libsamplemacros.h"
-class LIBSAMPLE_API Base1
+class Base1
{
public:
Base1() : m_value(1) {}
@@ -49,7 +49,7 @@ private:
int m_value;
};
-class LIBSAMPLE_API Base2
+class Base2
{
public:
Base2() : m_value(2) {}
@@ -69,8 +69,8 @@ public:
virtual int base1Method() { return Base1::base1Method() * 10; }
virtual int base2Method() { return Base2::base2Method() * 10; }
- Base1* castToBase1() { return (Base1*) this; }
- Base2* castToBase2() { return (Base2*) this; }
+ inline Base1* castToBase1() { return (Base1*) this; }
+ inline Base2* castToBase2() { return (Base2*) this; }
static MDerived1* transformFromBase1(Base1 *self);
static MDerived1* transformFromBase2(Base2 *self);
@@ -80,20 +80,20 @@ private:
int m_value;
};
-class LIBSAMPLE_API SonOfMDerived1 : public MDerived1
+class SonOfMDerived1 : public MDerived1
{
public:
SonOfMDerived1() : m_value(0) {}
~SonOfMDerived1() {}
- MDerived1* castToMDerived1() { return (MDerived1*) this; }
+ inline MDerived1* castToMDerived1() { return (MDerived1*) this; }
int sonOfMDerived1Method() { return m_value; }
private:
int m_value;
};
-class LIBSAMPLE_API Base3
+class Base3
{
public:
explicit Base3(int val = 3) : m_value(val) {}
@@ -103,7 +103,7 @@ private:
int m_value;
};
-class LIBSAMPLE_API Base4
+class Base4
{
public:
Base4() : m_value(4) {}
@@ -113,7 +113,7 @@ private:
int m_value;
};
-class LIBSAMPLE_API Base5
+class Base5
{
public:
Base5() : m_value(5) {}
@@ -123,7 +123,7 @@ private:
int m_value;
};
-class LIBSAMPLE_API Base6
+class Base6
{
public:
Base6() : m_value(6) {}
@@ -140,13 +140,13 @@ public:
MDerived2();
virtual ~MDerived2() {}
- int base4Method() { return Base3::base3Method() * 10; }
- int mderived2Method() { return m_value; }
+ inline int base4Method() { return Base3::base3Method() * 10; }
+ inline int mderived2Method() { return m_value; }
- Base3* castToBase3() { return (Base3*) this; }
- Base4* castToBase4() { return (Base4*) this; }
- Base5* castToBase5() { return (Base5*) this; }
- Base6* castToBase6() { return (Base6*) this; }
+ inline Base3* castToBase3() { return (Base3*) this; }
+ inline Base4* castToBase4() { return (Base4*) this; }
+ inline Base5* castToBase5() { return (Base5*) this; }
+ inline Base6* castToBase6() { return (Base6*) this; }
private:
int m_value;
@@ -158,12 +158,12 @@ public:
MDerived3();
virtual ~MDerived3() {}
- virtual int mderived3Method() { return m_value; }
+ inline virtual int mderived3Method() { return m_value; }
- MDerived1* castToMDerived1() { return (MDerived1*) this; }
- MDerived2* castToMDerived2() { return (MDerived2*) this; }
+ inline MDerived1* castToMDerived1() { return (MDerived1*) this; }
+ inline MDerived2* castToMDerived2() { return (MDerived2*) this; }
- Base3* castToBase3() { return (Base3*) this; }
+ inline Base3* castToBase3() { return (Base3*) this; }
private:
int m_value;
@@ -175,10 +175,10 @@ public:
MDerived4();
~MDerived4() {}
- int mderived4Method() { return 0; }
+ inline int mderived4Method() { return 0; }
- Base3* castToBase3() { return (Base3*) this; }
- Base4* castToBase4() { return (Base4*) this; }
+ inline Base3* castToBase3() { return (Base3*) this; }
+ inline Base4* castToBase4() { return (Base4*) this; }
private:
int m_value;
};
@@ -191,8 +191,8 @@ public:
virtual int mderived5Method() { return 0; }
- Base3* castToBase3() { return (Base3*) this; }
- Base4* castToBase4() { return (Base4*) this; }
+ inline Base3* castToBase3() { return (Base3*) this; }
+ inline Base4* castToBase4() { return (Base4*) this; }
};
#endif // MDERIVED_H
diff --git a/tests/libsample/noimplicitconversion.h b/tests/libsample/noimplicitconversion.h
index 7b3e898ae..89010f426 100644
--- a/tests/libsample/noimplicitconversion.h
+++ b/tests/libsample/noimplicitconversion.h
@@ -39,14 +39,14 @@
// This class must not have implicit conversions AND
// no conversion operators should be defined in its own module.
-class LIBSAMPLE_API NoImplicitConversion
+class NoImplicitConversion
{
public:
explicit NoImplicitConversion(int objId) : m_objId(objId) {}
- int objId() const { return m_objId; }
- static int receivesNoImplicitConversionByValue(NoImplicitConversion arg) { return arg.m_objId; }
- static int receivesNoImplicitConversionByPointer(NoImplicitConversion* arg) { return arg->m_objId; }
- static int receivesNoImplicitConversionByReference(NoImplicitConversion& arg) { return arg.m_objId; }
+ inline int objId() const { return m_objId; }
+ inline static int receivesNoImplicitConversionByValue(NoImplicitConversion arg) { return arg.m_objId; }
+ inline static int receivesNoImplicitConversionByPointer(NoImplicitConversion* arg) { return arg->m_objId; }
+ inline static int receivesNoImplicitConversionByReference(NoImplicitConversion& arg) { return arg.m_objId; }
private:
int m_objId;
};
diff --git a/tests/libsample/nondefaultctor.h b/tests/libsample/nondefaultctor.h
index cd4f6eace..ea0d6dfab 100644
--- a/tests/libsample/nondefaultctor.h
+++ b/tests/libsample/nondefaultctor.h
@@ -37,7 +37,7 @@
#include "libsamplemacros.h"
-class LIBSAMPLE_API NonDefaultCtor
+class NonDefaultCtor
{
int m_value;
public:
@@ -45,22 +45,22 @@ public:
{
}
- int value()
+ inline int value()
{
return m_value;
}
- NonDefaultCtor returnMyself()
+ inline NonDefaultCtor returnMyself()
{
return *this;
}
- NonDefaultCtor returnMyself(int)
+ inline NonDefaultCtor returnMyself(int)
{
return *this;
}
- NonDefaultCtor returnMyself(int, NonDefaultCtor)
+ inline NonDefaultCtor returnMyself(int, NonDefaultCtor)
{
return *this;
}
@@ -70,7 +70,7 @@ public:
return *this;
}
- NonDefaultCtor callReturnMyselfVirtual()
+ inline NonDefaultCtor callReturnMyselfVirtual()
{
return returnMyselfVirtual();
}
diff --git a/tests/libsample/objecttype.h b/tests/libsample/objecttype.h
index 9c0bb2123..34142185e 100644
--- a/tests/libsample/objecttype.h
+++ b/tests/libsample/objecttype.h
@@ -41,7 +41,7 @@
#include "libsamplemacros.h"
-struct LIBSAMPLE_API Event
+struct Event
{
enum EventType {
NO_EVENT,
@@ -67,12 +67,12 @@ public:
virtual ~ObjectType();
// factory method
- static ObjectType* create() { return new ObjectType(); }
+ inline static ObjectType* create() { return new ObjectType(); }
static ObjectType* createWithChild();
void setParent(ObjectType* parent);
- ObjectType* parent() const { return m_parent; }
- const ObjectTypeList& children() const { return m_children; }
+ inline ObjectType* parent() const { return m_parent; }
+ inline const ObjectTypeList& children() const { return m_children; }
void killChild(const Str& name);
void removeChild(ObjectType* child);
ObjectType* takeChild(ObjectType* child);
@@ -82,7 +82,7 @@ public:
Str objectName() const;
void setObjectName(const Str& name);
- unsigned long identifier() const { return reinterpret_cast<unsigned long>(this); }
+ inline unsigned long identifier() const { return reinterpret_cast<unsigned long>(this); }
bool causeEvent(Event::EventType eventType);
@@ -93,7 +93,7 @@ public:
// This nonsense method emulate QWidget.setLayout method
// All layout objects will became children of this object.
void setLayout(ObjectTypeLayout* layout);
- ObjectTypeLayout* layout() const { return m_layout; }
+ inline ObjectTypeLayout* layout() const { return m_layout; }
// This method should be reimplemented by ObjectTypeLayout.
virtual bool isLayoutType() { return false; }
diff --git a/tests/libsample/objecttypelayout.h b/tests/libsample/objecttypelayout.h
index 1f05b7495..8473bb079 100644
--- a/tests/libsample/objecttypelayout.h
+++ b/tests/libsample/objecttypelayout.h
@@ -48,7 +48,7 @@ public:
std::list<ObjectType*> objects() const;
virtual bool isLayoutType() { return true; }
- static ObjectTypeLayout* create() { return new ObjectTypeLayout(); }
+ inline static ObjectTypeLayout* create() { return new ObjectTypeLayout(); }
virtual ObjectType* takeChild(const Str& name) { return ObjectType::takeChild(name); }
private:
diff --git a/tests/libsample/objectview.h b/tests/libsample/objectview.h
index ae65d98d4..085300350 100644
--- a/tests/libsample/objectview.h
+++ b/tests/libsample/objectview.h
@@ -47,8 +47,8 @@ public:
: ObjectType(parent), m_model(model)
{}
- void setModel(ObjectType* model) { m_model = model; }
- ObjectType* model() const { return m_model; }
+ inline void setModel(ObjectType* model) { m_model = model; }
+ inline ObjectType* model() const { return m_model; }
Str displayModelData();
void modifyModelData(Str& data);
diff --git a/tests/libsample/oddbool.h b/tests/libsample/oddbool.h
index 47f0edb9e..e46894766 100644
--- a/tests/libsample/oddbool.h
+++ b/tests/libsample/oddbool.h
@@ -37,7 +37,7 @@
#include "libsamplemacros.h"
-class LIBSAMPLE_API OddBool
+class OddBool
{
public:
@@ -57,21 +57,21 @@ inline bool operator!=(OddBool b1, bool b2) { return !b1 != !b2; }
inline bool operator!=(bool b1, OddBool b2) { return !b1 != !b2; }
inline bool operator!=(OddBool b1, OddBool b2) { return !b1 != !b2; }
-class LIBSAMPLE_API OddBoolUser
+class OddBoolUser
{
public:
OddBoolUser() : m_oddbool(OddBool(false)) {}
virtual ~OddBoolUser() {}
- OddBool oddBool() { return m_oddbool; }
- void setOddBool(OddBool oddBool) { m_oddbool = oddBool; }
+ inline OddBool oddBool() { return m_oddbool; }
+ inline void setOddBool(OddBool oddBool) { m_oddbool = oddBool; }
virtual OddBool invertedOddBool()
{
return !m_oddbool;
}
- OddBool callInvertedOddBool()
+ inline OddBool callInvertedOddBool()
{
return invertedOddBool();
}
diff --git a/tests/libsample/overload.h b/tests/libsample/overload.h
index 626873159..dbce9de8d 100644
--- a/tests/libsample/overload.h
+++ b/tests/libsample/overload.h
@@ -63,12 +63,12 @@ public:
FunctionEnum overloaded(Point* point, ParamEnum param);
FunctionEnum overloaded(const Point& point);
- void differentReturnTypes(ParamEnum param = Param0) {}
- int differentReturnTypes(ParamEnum param, int val) { return val; }
+ inline void differentReturnTypes(ParamEnum param = Param0) {}
+ inline int differentReturnTypes(ParamEnum param, int val) { return val; }
- int intOverloads(const Point& p, double d) { return 1; }
- int intOverloads(int i, int i2) { return 2; }
- int intOverloads(int i, int removedArg, double d) { return 3; }
+ inline int intOverloads(const Point& p, double d) { return 1; }
+ inline int intOverloads(int i, int i2) { return 2; }
+ inline int intOverloads(int i, int removedArg, double d) { return 3; }
};
#endif // OVERLOAD_H
diff --git a/tests/libsample/overloadsort.h b/tests/libsample/overloadsort.h
index 3deeaf454..83ab04308 100644
--- a/tests/libsample/overloadsort.h
+++ b/tests/libsample/overloadsort.h
@@ -39,48 +39,48 @@
#include <list>
-class LIBSAMPLE_API ImplicitTarget
+class ImplicitTarget
{
public:
ImplicitTarget(){}
};
-class LIBSAMPLE_API ImplicitBase
+class ImplicitBase
{
public:
ImplicitBase(){}
ImplicitBase(const ImplicitTarget &b){}
};
-class LIBSAMPLE_API SortedOverload
+class SortedOverload
{
public:
- const char *overload(int x) {
+ inline const char *overload(int x) {
return "int";
}
- const char *overload(double x) {
+ inline const char *overload(double x) {
return "double";
}
- const char *overload(ImplicitBase x) {
+ inline const char *overload(ImplicitBase x) {
return "ImplicitBase";
}
- const char *overload(ImplicitTarget x) {
+ inline const char *overload(ImplicitTarget x) {
return "ImplicitTarget";
}
- const char *overload(const std::list<ImplicitBase> &x) {
+ inline const char *overload(const std::list<ImplicitBase> &x) {
return "list(ImplicitBase)";
}
- int implicit_overload(const ImplicitBase &x) {
+ inline int implicit_overload(const ImplicitBase &x) {
return 1;
}
- const char *overloadDeep(int x, ImplicitBase &y) {
+ inline const char *overloadDeep(int x, ImplicitBase &y) {
return "ImplicitBase";
}
};
diff --git a/tests/libsample/pairuser.h b/tests/libsample/pairuser.h
index 8a3cb7a94..6e42f44c4 100644
--- a/tests/libsample/pairuser.h
+++ b/tests/libsample/pairuser.h
@@ -51,8 +51,8 @@ public:
static std::pair<Complex, Complex> createComplexPair(Complex cpx0, Complex cpx1);
double sumPair(std::pair<int, double> pair);
- void setPair(std::pair<int, int> pair) { m_pair = pair; }
- std::pair<int, int> getPair() { return m_pair; }
+ inline void setPair(std::pair<int, int> pair) { m_pair = pair; }
+ inline std::pair<int, int> getPair() { return m_pair; }
private:
std::pair<int, int> m_pair;
diff --git a/tests/libsample/point.h b/tests/libsample/point.h
index a81750391..585f94991 100644
--- a/tests/libsample/point.h
+++ b/tests/libsample/point.h
@@ -47,16 +47,16 @@ public:
Point(double x, double y);
~Point() {}
- double x() const { return m_x; }
- double y() const { return m_y; }
+ inline double x() const { return m_x; }
+ inline double y() const { return m_y; }
- void setX(double x) { m_x = x; }
- void setY(double y) { m_y = y; }
+ inline void setX(double x) { m_x = x; }
+ inline void setY(double y) { m_y = y; }
Point* copy() const;
- const Point& getConstReferenceToSelf() const { return *this; }
- const Point* getSelf() const { return this; }
+ inline const Point& getConstReferenceToSelf() const { return *this; }
+ inline const Point* getSelf() const { return this; }
// The != operator is not implemented for the purpose of testing
// for the absense of the __ne__ method in the Python binding.
diff --git a/tests/libsample/pointerholder.h b/tests/libsample/pointerholder.h
index 7d4654511..cf11cad7b 100644
--- a/tests/libsample/pointerholder.h
+++ b/tests/libsample/pointerholder.h
@@ -37,12 +37,12 @@
#include "libsamplemacros.h"
-class LIBSAMPLE_API PointerHolder
+class PointerHolder
{
public:
explicit PointerHolder(void* ptr) : m_pointer(ptr) {}
~PointerHolder() {}
- void* pointer() const { return m_pointer; }
+ inline void* pointer() const { return m_pointer; }
private:
void* m_pointer;
};
diff --git a/tests/libsample/polygon.h b/tests/libsample/polygon.h
index 289be29b2..9d341a65c 100644
--- a/tests/libsample/polygon.h
+++ b/tests/libsample/polygon.h
@@ -53,7 +53,7 @@ public:
void addPoint(Point point);
- const PointList& points() const { return m_points; }
+ inline const PointList& points() const { return m_points; }
// This method intentionally receives and returns copies of a Polygon object.
static Polygon doublePolygonScale(Polygon polygon);
diff --git a/tests/libsample/privatector.h b/tests/libsample/privatector.h
index 5591f15f3..674a2052d 100644
--- a/tests/libsample/privatector.h
+++ b/tests/libsample/privatector.h
@@ -37,17 +37,17 @@
#include "libsamplemacros.h"
-class LIBSAMPLE_API PrivateCtor
+class PrivateCtor
{
public:
- static PrivateCtor* instance()
+ inline static PrivateCtor* instance()
{
static PrivateCtor self;
self.m_instanciations++;
return &self;
}
- int instanceCalls()
+ inline int instanceCalls()
{
return m_instanciations;
}
diff --git a/tests/libsample/privatedtor.h b/tests/libsample/privatedtor.h
index 73f7f4d84..0bc8c2f7f 100644
--- a/tests/libsample/privatedtor.h
+++ b/tests/libsample/privatedtor.h
@@ -37,23 +37,23 @@
#include "libsamplemacros.h"
-class LIBSAMPLE_API PrivateDtor
+class PrivateDtor
{
public:
- static PrivateDtor* instance()
+ inline static PrivateDtor* instance()
{
static PrivateDtor self;
self.m_instanciations++;
return &self;
}
- int instanceCalls()
+ inline int instanceCalls()
{
return m_instanciations;
}
protected:
- int protectedInstanceCalls() { return m_instanciations; }
+ inline int protectedInstanceCalls() { return m_instanciations; }
private:
int m_instanciations;
diff --git a/tests/libsample/protected.h b/tests/libsample/protected.h
index 0d1ead61d..4bb26b50c 100644
--- a/tests/libsample/protected.h
+++ b/tests/libsample/protected.h
@@ -38,22 +38,21 @@
#include "libsamplemacros.h"
#include <string>
-class LIBSAMPLE_API ProtectedNonPolymorphic
+class ProtectedNonPolymorphic
{
public:
explicit ProtectedNonPolymorphic(const char *name) : m_name(name) {}
~ProtectedNonPolymorphic() {}
- const char* publicName() { return m_name.c_str(); }
+ inline const char* publicName() { return m_name.c_str(); }
- static ProtectedNonPolymorphic* create() { return new ProtectedNonPolymorphic("created"); }
+ inline static ProtectedNonPolymorphic* create() { return new ProtectedNonPolymorphic("created"); }
protected:
- const char* protectedName() { return m_name.c_str(); }
- int protectedSum(int a0, int a1) { return a0 + a1; }
- int modifiedProtectedSum(int a0, int a1) { return a0 + a1; }
- static const char* protectedStatic() { return "protectedStatic"; }
-
+ inline const char* protectedName() { return m_name.c_str(); }
+ inline int protectedSum(int a0, int a1) { return a0 + a1; }
+ inline int modifiedProtectedSum(int a0, int a1) { return a0 + a1; }
+ inline static const char* protectedStatic() { return "protectedStatic"; }
inline const char* dataTypeName(void *data = 0) const { return "pointer"; }
inline const char* dataTypeName(int data) const { return "integer"; }
@@ -61,17 +60,15 @@ private:
std::string m_name;
};
-class LIBSAMPLE_API ProtectedPolymorphic
+class ProtectedPolymorphic
{
public:
explicit ProtectedPolymorphic(const char *name) : m_name(name) {}
virtual ~ProtectedPolymorphic() {}
- const char* publicName() { return m_name.c_str(); }
-
- static ProtectedPolymorphic* create() { return new ProtectedPolymorphic("created"); }
-
- const char* callProtectedName() { return protectedName(); }
+ inline static ProtectedPolymorphic* create() { return new ProtectedPolymorphic("created"); }
+ inline const char* publicName() { return m_name.c_str(); }
+ inline const char* callProtectedName() { return protectedName(); }
protected:
virtual const char* protectedName() { return m_name.c_str(); }
@@ -80,34 +77,34 @@ private:
std::string m_name;
};
-class LIBSAMPLE_API ProtectedPolymorphicDaughter : public ProtectedPolymorphic
+class ProtectedPolymorphicDaughter : public ProtectedPolymorphic
{
public:
explicit ProtectedPolymorphicDaughter(const char *name) : ProtectedPolymorphic(name) {}
- static ProtectedPolymorphicDaughter* create() { return new ProtectedPolymorphicDaughter("created"); }
+ inline static ProtectedPolymorphicDaughter* create() { return new ProtectedPolymorphicDaughter("created"); }
};
-class LIBSAMPLE_API ProtectedPolymorphicGrandDaughter: public ProtectedPolymorphicDaughter
+class ProtectedPolymorphicGrandDaughter: public ProtectedPolymorphicDaughter
{
public:
explicit ProtectedPolymorphicGrandDaughter(const char *name) : ProtectedPolymorphicDaughter(name) {}
- static ProtectedPolymorphicGrandDaughter* create() { return new ProtectedPolymorphicGrandDaughter("created"); }
+ inline static ProtectedPolymorphicGrandDaughter* create() { return new ProtectedPolymorphicGrandDaughter("created"); }
};
class LIBSAMPLE_API ProtectedVirtualDestructor
{
public:
ProtectedVirtualDestructor() {}
- static ProtectedVirtualDestructor* create() { return new ProtectedVirtualDestructor(); }
- static int dtorCalled() { return dtor_called; }
- static void resetDtorCounter() { dtor_called = 0; }
+ inline static ProtectedVirtualDestructor* create() { return new ProtectedVirtualDestructor(); }
+ inline static int dtorCalled() { return dtor_called; }
+ inline static void resetDtorCounter() { dtor_called = 0; }
protected:
virtual ~ProtectedVirtualDestructor() { dtor_called++; }
private:
static int dtor_called;
};
-class LIBSAMPLE_API ProtectedEnumClass
+class ProtectedEnumClass
{
public:
ProtectedEnumClass() {}
@@ -122,13 +119,14 @@ protected:
ProtectedItem1
};
ProtectedEnum callProtectedEnumMethod(ProtectedEnum in) { return protectedEnumMethod(in); }
+ inline PublicEnum callPublicEnumMethod(PublicEnum in) { return publicEnumMethod(in); }
+
virtual ProtectedEnum protectedEnumMethod(ProtectedEnum in) { return in; }
- PublicEnum callPublicEnumMethod(PublicEnum in) { return publicEnumMethod(in); }
virtual PublicEnum publicEnumMethod(PublicEnum in) { return in; }
};
-class LIBSAMPLE_API ProtectedProperty
+class ProtectedProperty
{
public:
ProtectedProperty() : protectedProperty(0) {}
diff --git a/tests/libsample/reference.h b/tests/libsample/reference.h
index 1a95ad2c7..5f9c20c4e 100644
--- a/tests/libsample/reference.h
+++ b/tests/libsample/reference.h
@@ -44,11 +44,11 @@ public:
: m_objId(objId) {}
virtual ~Reference() {}
- int objId() { return m_objId; }
- void setObjId(int objId) { m_objId = objId; }
+ inline int objId() { return m_objId; }
+ inline void setObjId(int objId) { m_objId = objId; }
- static int usesReference(Reference& r) { return r.m_objId; }
- static int usesConstReference(const Reference& r) { return r.m_objId; }
+ inline static int usesReference(Reference& r) { return r.m_objId; }
+ inline static int usesConstReference(const Reference& r) { return r.m_objId; }
virtual int usesReferenceVirtual(Reference& r, int inc);
virtual int usesConstReferenceVirtual(const Reference& r, int inc);
@@ -61,7 +61,7 @@ public:
void show() const;
- static int multiplier() { return 10; }
+ inline static int multiplier() { return 10; }
private:
int m_objId;
diff --git a/tests/libsample/samplenamespace.h b/tests/libsample/samplenamespace.h
index 0456c56ef..8a6cd1a4d 100644
--- a/tests/libsample/samplenamespace.h
+++ b/tests/libsample/samplenamespace.h
@@ -74,7 +74,7 @@ LIBSAMPLE_API void doSomethingWithArray(const unsigned char* data, unsigned int
LIBSAMPLE_API int enumItemAsDefaultValueToIntArgument(int value = ZeroIn);
-class SomeClass
+class LIBSAMPLE_API SomeClass
{
public:
class SomeInnerClass
@@ -88,17 +88,17 @@ public:
NiceValue1, NiceValue2
};
- int someMethod(SomeInnerClass*) { return 0; }
+ inline int someMethod(SomeInnerClass*) { return 0; }
virtual OkThisIsRecursiveEnough* someVirtualMethod(OkThisIsRecursiveEnough* arg) { return arg; }
};
};
};
-class DerivedFromNamespace : public SomeClass::SomeInnerClass::OkThisIsRecursiveEnough
+class LIBSAMPLE_API DerivedFromNamespace : public SomeClass::SomeInnerClass::OkThisIsRecursiveEnough
{
public:
virtual OkThisIsRecursiveEnough* someVirtualMethod(OkThisIsRecursiveEnough* arg) { return arg; }
- OkThisIsRecursiveEnough* methodReturningTypeFromParentScope() { return 0; }
+ inline OkThisIsRecursiveEnough* methodReturningTypeFromParentScope() { return 0; }
};
// The combination of the following two overloaded methods could trigger a
diff --git a/tests/libsample/size.h b/tests/libsample/size.h
index a1431a8b0..c5bf2b5cb 100644
--- a/tests/libsample/size.h
+++ b/tests/libsample/size.h
@@ -43,12 +43,12 @@ public:
Size(double width = 0.0, double height = 0.0) : m_width(width), m_height(height) {}
~Size() {}
- double width() { return m_width; }
- void setWidth(double width) { m_width = width; }
- double height() { return m_height; }
- void setHeight(double height) { m_height = height; }
+ inline double width() { return m_width; }
+ inline void setWidth(double width) { m_width = width; }
+ inline double height() { return m_height; }
+ inline void setHeight(double height) { m_height = height; }
- double calculateArea() const { return m_width * m_height; }
+ inline double calculateArea() const { return m_width * m_height; }
// Comparison Operators
inline bool operator==(const Size& other)
@@ -92,28 +92,28 @@ public:
inline bool operator>=(double area) { return calculateArea() >= area; }
// Arithmetic Operators
- Size& operator+=(const Size& s)
+ inline Size& operator+=(const Size& s)
{
m_width += s.m_width;
m_height += s.m_height;
return *this;
}
- Size& operator-=(const Size& s)
+ inline Size& operator-=(const Size& s)
{
m_width -= s.m_width;
m_height -= s.m_height;
return *this;
}
- Size& operator*=(double mult)
+ inline Size& operator*=(double mult)
{
m_width *= mult;
m_height *= mult;
return *this;
}
- Size& operator/=(double div)
+ inline Size& operator/=(double div)
{
m_width /= div;
m_height /= div;
diff --git a/tests/libsample/sometime.h b/tests/libsample/sometime.h
index 6f20425e3..d67998715 100644
--- a/tests/libsample/sometime.h
+++ b/tests/libsample/sometime.h
@@ -59,12 +59,12 @@ public:
~Time() {}
- bool isNull() const { return m_is_null; }
+ inline bool isNull() const { return m_is_null; }
- int hour() const { return m_hour; }
- int minute() const { return m_minute; }
- int second() const { return m_second; }
- int msec() const { return m_msec; }
+ inline int hour() const { return m_hour; }
+ inline int minute() const { return m_minute; }
+ inline int second() const { return m_second; }
+ inline int msec() const { return m_msec; }
void setTime();
void setTime(int h, int m, int s = 0, int ms = 0);
diff --git a/tests/libsample/str.h b/tests/libsample/str.h
index 7d5f0e63d..9675d4ec8 100644
--- a/tests/libsample/str.h
+++ b/tests/libsample/str.h
@@ -59,7 +59,7 @@ public:
void show() const;
- int size() const { return m_str.size(); }
+ inline int size() const { return m_str.size(); }
// nonsense operator just to test reverse operators
Str operator+(int number) const;
diff --git a/tests/libsample/strlist.h b/tests/libsample/strlist.h
index 85b746464..334c868f9 100644
--- a/tests/libsample/strlist.h
+++ b/tests/libsample/strlist.h
@@ -48,7 +48,7 @@ public:
inline StrList(const StrList& lst) : std::list<Str>(lst) { }
inline StrList(const std::list<Str>& lst) : std::list<Str>(lst) { }
- void append(Str str) { push_back(str); }
+ inline void append(Str str) { push_back(str); }
Str join(const Str& sep) const;
bool operator==(const std::list<Str>& other) const;
diff --git a/tests/libsample/voidholder.h b/tests/libsample/voidholder.h
index 02c446d02..032c9531b 100644
--- a/tests/libsample/voidholder.h
+++ b/tests/libsample/voidholder.h
@@ -37,13 +37,13 @@
#include "libsamplemacros.h"
-class LIBSAMPLE_API VoidHolder
+class VoidHolder
{
public:
explicit VoidHolder(void* ptr = 0) : m_ptr(ptr) {}
~VoidHolder() {}
- void* voidPointer() { return m_ptr; }
- static void* gimmeMeSomeVoidPointer()
+ inline void* voidPointer() { return m_ptr; }
+ inline static void* gimmeMeSomeVoidPointer()
{
static void* pointerToSomething = new VoidHolder();
return pointerToSomething;