Go to the documentation of this file.
27 std::unique_ptr<char,
void(*)(
void*)> dup(strdup(
filename), free);
29 c = strrchr(dup.get(),
'.');
35 c = strrchr(dup.get(),
'.');
43 std::string faceset(
c);
45 c = strrchr(dup.get(),
'/');
53 auto &items = licenses[faceset];
62 c = strchr(
line,
' ');
71 items.push_back(std::make_pair(
line,
c));
78 return search->second;
84 auto dot = face.find(
'.');
85 if (dot == std::string::npos)
89 return face.substr(0, dot);
size_t bufferreader_current_line(BufferReader *br)
void LOG(LogLevel logLevel, const char *format,...)
std::map< std::string, LicenseItems > m_licenses
static event_registration c
std::map< std::string, std::vector< LicenseItem > > LicenseItems
static std::string licenseNameFromFaceName(const std::string &face)
void readLicense(BufferReader *reader, const char *filename)
virtual ~LicenseManager()
LicenseItems getForFace(const std::string &face)
static void parseLicenseFile(BufferReader *reader, const char *filename, std::vector< LicenseItem > &items)
char * bufferreader_next_line(BufferReader *br)