Cppcheck
Functions
importproject.cpp File Reference
#include "importproject.h"
#include "path.h"
#include "settings.h"
#include "standards.h"
#include "suppressions.h"
#include "token.h"
#include "tokenlist.h"
#include "utils.h"
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iterator>
#include <sstream>
#include <unordered_set>
#include <utility>
#include "xml.h"
#include "json.h"

Go to the source code of this file.

Functions

static bool simplifyPathWithVariables (std::string &s, std::map< std::string, std::string, cppcheck::stricmp > &variables)
 
static std::string readUntil (const std::string &command, std::string::size_type *pos, const char until[])
 
static std::string unescape (const std::string &in)
 
static std::list< std::string > toStringList (const std::string &s)
 
static void importPropertyGroup (const tinyxml2::XMLElement *node, std::map< std::string, std::string, cppcheck::stricmp > &variables, std::string &includePath, bool *useOfMfc)
 
static void loadVisualStudioProperties (const std::string &props, std::map< std::string, std::string, cppcheck::stricmp > &variables, std::string &includePath, const std::string &additionalIncludeDirectories, std::list< ItemDefinitionGroup > &itemDefinitionGroupList)
 
static std::string joinRelativePath (const std::string &path1, const std::string &path2)
 
static std::list< std::string > readXmlStringList (const tinyxml2::XMLElement *node, const std::string &path, const char name[], const char attribute[])
 
static std::string join (const std::list< std::string > &strlist, const char *sep)
 
static std::string istream_to_string (std::istream &istr)
 
static const char * readSafe (const char *s, const char *def)
 

Function Documentation

◆ importPropertyGroup()

static void importPropertyGroup ( const tinyxml2::XMLElement *  node,
std::map< std::string, std::string, cppcheck::stricmp > &  variables,
std::string &  includePath,
bool *  useOfMfc 
)
static

Definition at line 607 of file importproject.cpp.

Referenced by ImportProject::importVcxproj(), and loadVisualStudioProperties().

◆ istream_to_string()

static std::string istream_to_string ( std::istream &  istr)
static

Definition at line 1096 of file importproject.cpp.

Referenced by ImportProject::importCppcheckGuiProject().

◆ join()

static std::string join ( const std::list< std::string > &  strlist,
const char *  sep 
)
static

◆ joinRelativePath()

static std::string joinRelativePath ( const std::string &  path1,
const std::string &  path2 
)
static

Definition at line 1067 of file importproject.cpp.

References Path::isAbsolute().

Referenced by ImportProject::importCppcheckGuiProject(), and readXmlStringList().

◆ loadVisualStudioProperties()

static void loadVisualStudioProperties ( const std::string &  props,
std::map< std::string, std::string, cppcheck::stricmp > &  variables,
std::string &  includePath,
const std::string &  additionalIncludeDirectories,
std::list< ItemDefinitionGroup > &  itemDefinitionGroupList 
)
static

◆ readSafe()

static const char* readSafe ( const char *  s,
const char *  def 
)
static

Definition at line 1102 of file importproject.cpp.

Referenced by ImportProject::importCppcheckGuiProject().

◆ readUntil()

static std::string readUntil ( const std::string &  command,
std::string::size_type *  pos,
const char  until[] 
)
static

Definition at line 225 of file importproject.cpp.

Referenced by ImportProject::fsParseCommand().

◆ readXmlStringList()

static std::list<std::string> readXmlStringList ( const tinyxml2::XMLElement *  node,
const std::string &  path,
const char  name[],
const char  attribute[] 
)
static

Definition at line 1074 of file importproject.cpp.

References joinRelativePath().

Referenced by ImportProject::importCppcheckGuiProject().

◆ simplifyPathWithVariables()

static bool simplifyPathWithVariables ( std::string &  s,
std::map< std::string, std::string, cppcheck::stricmp > &  variables 
)
static
Todo:
generate a debug/info message about undefined variable

Definition at line 113 of file importproject.cpp.

References Path::fromNativeSeparators(), and Path::simplifyPath().

Referenced by ImportProject::fsSetIncludePaths(), and loadVisualStudioProperties().

◆ toStringList()

static std::list<std::string> toStringList ( const std::string &  s)
static

◆ unescape()

static std::string unescape ( const std::string &  in)
static

Definition at line 252 of file importproject.cpp.

Referenced by ImportProject::fsParseCommand().