From 55fbe68e6253d5cacba2bec840a49f1b7b026362 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Mon, 12 Nov 2012 13:57:10 +0100 Subject: [PATCH] Missing include and more doxygen improvements --- simgear/nasal/cppbind/Ghost.hxx | 10 ++++++++-- simgear/nasal/cppbind/from_nasal.hxx | 11 +++++++++-- simgear/nasal/cppbind/from_nasal_detail.hxx | 18 ++++++++++++++++-- simgear/nasal/cppbind/to_nasal.hxx | 5 +++-- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/simgear/nasal/cppbind/Ghost.hxx b/simgear/nasal/cppbind/Ghost.hxx index 0e3e4182..b8b471ea 100644 --- a/simgear/nasal/cppbind/Ghost.hxx +++ b/simgear/nasal/cppbind/Ghost.hxx @@ -1,5 +1,6 @@ -///@file Expose C++ objects to Nasal as ghosts -// +///@file +/// Expose C++ objects to Nasal as ghosts +/// // Copyright (C) 2012 Thomas Geymayer // // This library is free software; you can redistribute it and/or @@ -29,6 +30,11 @@ #include #include +#include + +/** + * Bindings between C++ and the Nasal scripting language + */ namespace nasal { diff --git a/simgear/nasal/cppbind/from_nasal.hxx b/simgear/nasal/cppbind/from_nasal.hxx index 23ac4683..d36d5826 100644 --- a/simgear/nasal/cppbind/from_nasal.hxx +++ b/simgear/nasal/cppbind/from_nasal.hxx @@ -1,5 +1,6 @@ -///@file Conversion functions to convert Nasal types to C++ types -// +///@file +/// Conversion functions to convert Nasal types to C++ types +/// // Copyright (C) 2012 Thomas Geymayer // // This library is free software; you can redistribute it and/or @@ -27,6 +28,12 @@ namespace nasal /** * Convert a Nasal type to any supported C++ type. * + * @param c Active Nasal context + * @param ref Nasal object to be converted + * @tparam T Target type of conversion + * + * @throws bad_nasal_cast if conversion is not possible + * * @note Every type which should be supported needs a function with the * following signature declared: * diff --git a/simgear/nasal/cppbind/from_nasal_detail.hxx b/simgear/nasal/cppbind/from_nasal_detail.hxx index d5db8cbd..2a053e4d 100644 --- a/simgear/nasal/cppbind/from_nasal_detail.hxx +++ b/simgear/nasal/cppbind/from_nasal_detail.hxx @@ -1,5 +1,6 @@ -// Conversion helpers used by from_nasal(naContext, naRef) -// +///@file +/// Conversion helpers used by from_nasal(naContext, naRef) +/// // Copyright (C) 2012 Thomas Geymayer // // This library is free software; you can redistribute it and/or @@ -39,10 +40,23 @@ namespace nasal public std::bad_cast { public: + /** + * Construct with generic error message + */ bad_nasal_cast(); + + /** + * Construct from an error message + * + * @param msg Error message/description + */ explicit bad_nasal_cast(const std::string& msg); virtual ~bad_nasal_cast() throw(); + + /** + * Get a description of the cause of the failed cast. + */ virtual const char* what() const throw(); protected: diff --git a/simgear/nasal/cppbind/to_nasal.hxx b/simgear/nasal/cppbind/to_nasal.hxx index ae1eb2ff..d90c6ab4 100644 --- a/simgear/nasal/cppbind/to_nasal.hxx +++ b/simgear/nasal/cppbind/to_nasal.hxx @@ -1,5 +1,6 @@ -///@file Conversion functions to convert C++ types to Nasal types -// +///@file +/// Conversion functions to convert C++ types to Nasal types +/// // Copyright (C) 2012 Thomas Geymayer // // This library is free software; you can redistribute it and/or -- 2.39.5