Tools and libraries to glue C/C++ APIs to high-level languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

83 lines
2.0 KiB

/************************************************************************
*
* CppSharp
* Licensed under the MIT license.
*
************************************************************************/
#include "CppParser.h"
#include "Parser.h"
#include <clang/Basic/Version.inc>
namespace CppSharp { namespace CppParser {
CppParserOptions::CppParserOptions()
: ASTContext(0)
, toolSetToUse(0)
, noStandardIncludes(false)
, noBuiltinIncludes(false)
, microsoftMode(false)
, verbose(false)
, unityBuild(false)
, skipPrivateDeclarations(true)
, skipLayoutInfo(false)
, skipFunctionBodies(true)
, clangVersion(CLANG_VERSION_STRING)
{
}
CppParserOptions::~CppParserOptions() {}
std::string CppParserOptions::getClangVersion() { return clangVersion; }
DEF_VECTOR_STRING(CppParserOptions, Arguments)
DEF_VECTOR_STRING(CppParserOptions, SourceFiles)
DEF_VECTOR_STRING(CppParserOptions, IncludeDirs)
DEF_VECTOR_STRING(CppParserOptions, SystemIncludeDirs)
DEF_VECTOR_STRING(CppParserOptions, Defines)
DEF_VECTOR_STRING(CppParserOptions, Undefines)
DEF_VECTOR_STRING(CppParserOptions, SupportedStdTypes)
ParserResult::ParserResult()
: targetInfo(0)
{
}
ParserResult::ParserResult(const ParserResult& rhs)
: kind(rhs.kind)
, Diagnostics(rhs.Diagnostics)
, Libraries(rhs.Libraries)
, targetInfo(rhs.targetInfo)
{}
ParserResult::~ParserResult()
{
for (auto Library : Libraries)
{
delete Library;
}
}
DEF_VECTOR(ParserResult, ParserDiagnostic, Diagnostics)
DEF_VECTOR(ParserResult, NativeLibrary*, Libraries)
LinkerOptions::LinkerOptions() {}
LinkerOptions::~LinkerOptions() {}
DEF_VECTOR_STRING(LinkerOptions, Arguments)
DEF_VECTOR_STRING(LinkerOptions, LibraryDirs)
DEF_VECTOR_STRING(LinkerOptions, Libraries)
ParserDiagnostic::ParserDiagnostic() {}
ParserDiagnostic::ParserDiagnostic(const ParserDiagnostic& rhs)
: fileName(rhs.fileName)
, message(rhs.message)
, level(rhs.level)
, lineNumber(rhs.lineNumber)
, columnNumber(rhs.columnNumber)
{}
ParserDiagnostic::~ParserDiagnostic() {}
} }