1
General discussions / Making SFML binary compatible across versions
« on: September 21, 2008, 06:03:04 pm »
I see SFML doesn't hide the private scope of its classes, can't this create binary compatibility issues in case you want to change them across minor versions? (as in, symbol size changes won't link)
Usually most C++ libraries (such as Qt), to avoid this, allocate the private scope separatedly like this:
myclass.h
myclass.cpp
Well, hope this is of any use.
Cheers!
Usually most C++ libraries (such as Qt), to avoid this, allocate the private scope separatedly like this:
myclass.h
Code: [Select]
class MyClassPrivate;
class MyClass {
MyClassPrivate *p;
public:
void methods();
MyClass();
~MyClass();
}
myclass.cpp
Code: [Select]
class MyClassPrivate {
public:
member variables
};
MyClass::MyClass() {
p = new MyClassPrivate;
}
MyClass::~MyClass() {
delete p;
}
Well, hope this is of any use.
Cheers!