#include "from_nasal_detail.hxx"
#include "NasalHash.hxx"
+#include <simgear/misc/sg_path.hxx>
+
namespace nasal
{
//----------------------------------------------------------------------------
return std::string(naStr_data(na_str), naStr_len(na_str));
}
+ SGPath from_nasal_helper(naContext c, naRef ref, SGPath*)
+ {
+ naRef na_str = naStringValue(c, ref);
+ return SGPath(std::string(naStr_data(na_str), naStr_len(na_str)));
+ }
+
//----------------------------------------------------------------------------
Hash from_nasal_helper(naContext c, naRef ref, Hash*)
{
#include <typeinfo> // std::bad_cast
#include <vector>
+class SGPath;
+
namespace nasal
{
class Hash;
*/
std::string from_nasal_helper(naContext c, naRef ref, std::string*);
+ /**
+ * Convert a Nasal string to an SGPath
+ */
+ SGPath from_nasal_helper(naContext c, naRef ref, SGPath*);
+
/**
* Convert a Nasal hash to a nasal::Hash
*/
#include "to_nasal.hxx"
#include "NasalHash.hxx"
+#include <simgear/misc/sg_path.hxx>
+
namespace nasal
{
//----------------------------------------------------------------------------
return ref;
}
+ //----------------------------------------------------------------------------
+ naRef to_nasal(naContext c, const SGPath& path)
+ {
+ return to_nasal(c, path.str());
+ }
} // namespace nasal
#include <string>
#include <vector>
+class SGPath;
+
namespace nasal
{
class Hash;
*/
naRef to_nasal(naContext c, naRef ref);
+ naRef to_nasal(naContext c, const SGPath& path);
+
/**
* Convert a numeric type to Nasal number
*/