diff options
author | Ian C <ianc@noddybox.co.uk> | 2005-04-15 00:53:56 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2005-04-15 00:53:56 +0000 |
commit | 71c1ae31007891ecfd59236ba8564bc4b5deb1e4 (patch) | |
tree | 5d307457e7bfa2bb544267826a37366c51215901 /test/mstest.cpp | |
parent | ede67ff31c69f56094a1248cd0bdb7f529dba0f3 (diff) |
Initial import
Diffstat (limited to 'test/mstest.cpp')
-rw-r--r-- | test/mstest.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/mstest.cpp b/test/mstest.cpp new file mode 100644 index 0000000..1a63d6d --- /dev/null +++ b/test/mstest.cpp @@ -0,0 +1,36 @@ +#include <w32dlib/w32dlib.h> + +#include "mingwms.h" +#include "msLib.h" + +static const char* GetTitle() +{ + return "Mingw test plugin"; +} + +static int Execute(msModel* model) +{ + if (!model) + return -1; + + if (msModel_GetMeshCount(model)<1) + { + W32DLib::Common::Error(NULL, "No meshes in the model!"); + return 0; + } + + for(int i = 0; i < msModel_GetMeshCount(model); ++i) + { + msMesh* mesh = msModel_GetMeshAt(model, i); + char buf[256]; + msMesh_GetName(mesh, buf, 255); + W32DLib::Common::Message(NULL, buf); + } + + return 0; +} + +PLUGIN_SPEC void* CreatePlugIn() +{ + return CreateMINGWPlugin(MS_TYPE_TOOL, GetTitle, Execute); +} |