diff options
author | Jesper K. Pedersen <[email protected]> | 2013-04-25 13:29:11 +0200 |
---|---|---|
committer | Jesper K. Pedersen <[email protected]> | 2013-04-25 14:19:55 +0200 |
commit | ff615fc81ac67b52812dde6e08028018e233373c (patch) | |
tree | 4bc61cbf25fc701fc7528216b2a2f5f5c5b42eff /objects/cppargument.cpp | |
parent | b5b67207e6459e129368c13a8069359a74b503f1 (diff) |
Make it possible to extract information about methods
Change-Id: Id4faec0c4b540ef040043b1c76ae07e628a29c0e
Reviewed-by: Nicolas Arnaud-Cormos <[email protected]>
Diffstat (limited to 'objects/cppargument.cpp')
-rw-r--r-- | objects/cppargument.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/objects/cppargument.cpp b/objects/cppargument.cpp new file mode 100644 index 0000000..10224c6 --- /dev/null +++ b/objects/cppargument.cpp @@ -0,0 +1,44 @@ +#include "cppargument.h" + +#include <cplusplus/Symbol.h> +#include <cplusplus/Symbols.h> +#include <cplusplus/Overview.h> +#include <cplusplus/Literals.h> + +namespace Scripting { +namespace Internal { + + +CppArgument *CppArgument::create(CPlusPlus::Argument* argument) +{ + // Instance owned by QtScript + CppArgument* result = new CppArgument; + + CPlusPlus::Overview o; + result->m_name = o(argument->name()); + result->m_type = o(argument->type()); + result->m_initializer = argument->initializer() ? QString::fromUtf8(argument->initializer()->chars()) : QString(); + return result; +} + +QString CppArgument::name() const +{ + return m_name; +} + +QString CppArgument::type() const +{ + return m_type; +} + +QString CppArgument::initializer() const +{ + return m_initializer; +} + +CppArgument::CppArgument() +{ +} + +} // namespace Internal +} // namespace Scripting |