Skip to content

Instantly share code, notes, and snippets.

@meastp
Created March 8, 2013 13:00
Show Gist options
  • Save meastp/5116333 to your computer and use it in GitHub Desktop.
Save meastp/5116333 to your computer and use it in GitHub Desktop.
example_model.lib + .dll is the data model
application A is compiled with compiler A
and
library B is compiled with compiler B
The example_model can exist as a single version, compiled with either compiler A or B, or two versions.
Is it possible for application A to use library B to e.g. read or process a set of Lines, then retrieve them through the cross-compilation framework, and *continue working with the data model in application A* (for example change some points, add some attributes)?
If it is, what is the run time cost?
class Point
{
std::vector<Attribute*> attributes;
int x, y;
public:
virtual int getX();
virtual int getY();
virtual Attribute* getAttribute(i);
};
class Point2D : public Point
{
};
class Point3D : public Point
{
int z;
virtual int getZ();
};
class Line
{
std::vector<Point*> points;
std::vector<Attribute*> attributes;
public:
virtual Attribute* getAttribute(i);
virtual Point* getPoint(i);
};
class Attribute
{
public:
virtual void getValue() = 0;
};
class StringAttribute
{
std::string value;
public:
virtual std::string getValue();
};
class IntegerAttribute
{
int value;
public:
virtual int getValue();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment