-///@file Expose C++ objects to Nasal as ghosts
-//
+///@file
+/// Expose C++ objects to Nasal as ghosts
+///
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
//
// This library is free software; you can redistribute it and/or
#include <boost/lambda/lambda.hpp>
#include <boost/utility/enable_if.hpp>
+#include <map>
+
+/**
+ * Bindings between C++ and the Nasal scripting language
+ */
namespace nasal
{
-///@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 <tomgey@gmail.com>
//
// This library is free software; you can redistribute it and/or
/**
* 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:
*
-// Conversion helpers used by from_nasal<T>(naContext, naRef)
-//
+///@file
+/// Conversion helpers used by from_nasal<T>(naContext, naRef)
+///
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
//
// This library is free software; you can redistribute it and/or
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:
-///@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 <tomgey@gmail.com>
//
// This library is free software; you can redistribute it and/or