[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1943 - bug905
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1943 - bug905 |
Date: |
Fri, 26 Aug 2005 21:09:12 -0700 (PDT) |
Author: grothoff
Date: 2005-08-26 21:09:11 -0700 (Fri, 26 Aug 2005)
New Revision: 1943
Modified:
bug905/plug.cc
Log:
done
Modified: bug905/plug.cc
===================================================================
--- bug905/plug.cc 2005-08-27 04:03:54 UTC (rev 1942)
+++ bug905/plug.cc 2005-08-27 04:09:11 UTC (rev 1943)
@@ -3,92 +3,23 @@
#include <string>
#include <map>
-#if 0
-#include "exif.hpp"
-#include "image.hpp"
-#include "types.hpp"
-#endif
+extern "C" {
-namespace Exiv2 {
+ namespace E {
- class Image {
- public:
- //! Image auto_ptr type
- typedef std::auto_ptr<Image> AutoPtr;
- virtual ~Image() {}
- };
-
-
- class ImageFactory {
- public:
- static Image::AutoPtr open();
-
- class Init {
- static int count;
+ class Error {
public:
- Init();
- ~Init();
-
- private:
- static void init();
-
+ Error() { }
};
-
-
- };
- int ImageFactory::Init::count = 0;
-
- ImageFactory::Init::Init() {
- ++count;
- }
-
- ImageFactory::Init::~Init()
- {
- if (--count == 0) {
- // Exiv2::ImageFactory::cleanup();
- }
- }
-
- Image::AutoPtr ImageFactory::open()
- {
- Image::AutoPtr image;
- return image;
- }
-
- class AnyError {
- public:
- virtual ~AnyError()
- {
- }
- };
-
- class Error : public AnyError {
- public:
- explicit Error(int code) {
- }
- };
-}
-
-namespace {
- Exiv2::ImageFactory::Init imageFactoryInit;
-}
-
-extern "C" {
-
- namespace Exiv2 {
-
void f() {
- try {
-
- printf("In plug.\n");
- if (1) throw Error(12);
-
- } catch (const Exiv2::Error& e) {
+ printf("In plug.\n");
+ try {
+ throw Error();
+ } catch (const E::Error& e) {
}
printf("Leaving plug.\n");
- }
-
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1943 - bug905,
grothoff <=