[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/koffice/1.6/koffice/lib/kross/api
From: Dirk Mueller <mueller () kde ! org>
Date: 2006-07-31 22:31:31
Message-ID: 1154385091.681154.28065.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 568373 by mueller:
compile++
M +1 -0 exception.cpp
M +15 -13 object.h
--- branches/koffice/1.6/koffice/lib/kross/api/exception.cpp #568372:568373
@@ -17,6 +17,7 @@
* Boston, MA 02110-1301, USA.
***************************************************************************/
+#include "object.h"
#include "exception.h"
//#include <qstring.h>
--- branches/koffice/1.6/koffice/lib/kross/api/object.h #568372:568373
@@ -34,12 +34,6 @@
// Forward declaration.
class List;
- //FIXME We forward declare class Exception here while it's
- // used at the static fromObject() template-method.
- // Could that provide probs on !=gcc? Maybe that method
- // should go into it's own sourcefile anyway...
- class Exception;
-
/**
* The common Object class all other object-classes are
* inheritated from.
@@ -124,13 +118,7 @@
* \return The to a instance from template type T
* casted Object.
*/
- template<class T> static T* fromObject(Object::Ptr object)
- {
- T* t = (T*) object.data();
- if(! t)
- throw KSharedPtr<Exception>( new Exception(QString("Object \
\"%1\" invalid.").arg(object ? object->getClassName() : "")) );
- return t;
- }
+ template<class T> static T* fromObject(Object::Ptr object);
/**
* This method got used by the \a ProxyFunction classes
@@ -146,5 +134,19 @@
}}
+#include "exception.h"
+
+namespace Kross { namespace Api {
+
+template<class T> inline T* Object::fromObject(Object::Ptr object)
+{
+ T* t = (T*) object.data();
+ if(! t)
+ throw KSharedPtr<Exception>( new Exception(QString("Object \"%1\" \
invalid.").arg(object ? object->getClassName() : "")) ); + return t;
+}
+
+}}
+
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic