![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
Classes | |
| class | CompareObjectPtr |
| class | DoubleAccessObjectToIdMap |
| storage for double access: from object to id and from id to object : id must be integer. More... | |
| class | GenericDocumentProperties |
| class | GenericDocumentPropertiesPrivate |
| class | MultiValuedPropertyIterator |
| Holds document properties. More... | |
| class | S2ByteString |
| class | TextFormater |
| This class is dedicated to the various adaptations that have to be done on texts : More... | |
Typedefs | |
| typedef std::vector< std::string >::const_iterator | StringPropMultIter |
| typedef std::vector< std::pair< std::string, float > >::const_iterator | WeightedPropMultIter |
| typedef std::vector< std::pair< Position, Length > > | PositionLengthList |
Functions | |
| bool | mypredicate (const std::pair< std::string, float > &a, const std::pair< std::string, float > &b) |
| std::ostream & | operator<< (std::ostream &os, const GenericDocumentProperties &p) |
| QDebug & | operator<< (QDebug &os, const GenericDocumentProperties &p) |
| QTextStream & | operator<< (QTextStream &os, const GenericDocumentProperties &p) |
| uint64_t | readCodedInt (std::istream &file) |
| read a integer coded in variable-byte format in a file | |
| void | writeCodedInt (std::ostream &file, const uint64_t number) |
| write a integer coded in variable-byte format in a file | |
| uint8_t | readOneByteInt (std::istream &file) |
| read a integer coded on one byte in a file | |
| void | writeOneByteInt (std::ostream &file, const uint8_t number) |
| write a integer coded on one byte format in a file | |
| void | readStream (std::istream &is, std::string &dest) |
| Read an input stream into a string, until EOF. | |
| void | writeStream (std::ostream &os, const std::string &src) |
| Write a string to an output stream. | |
| std::string | readLine (std::istream &inputFile) |
| void | readString (std::istream &file, std::string &s) |
| Read an input stream into a wide string, until EOF. | |
| void | writeString (std::ostream &file, const std::string &s) |
| write a string on an output file stream | |
| void | readStringField (istream &file, string &s) |
| void | writeStringField (ostream &file, const string &s) |
| void | readUTF8StringField (std::istream &file, Lima::LimaString &s) |
| Binary read an utf8 string from a file and store it in a LimaString. | |
| void | writeUTF8StringField (std::ostream &file, const Lima::LimaString &s) |
| Binary write a a LimaString in a file as an utf8 string. | |
| LimaString | utf8stdstring2limastring (const std::string &src) |
| std::string | localestring2utf8string (const std::string &src) |
| ␈rief Convert a string in the locale codepage to a UTF8 string | |
| LimaString | latin15stdstring2limastring (const std::string &src) |
| Convert a latin15 string to a LimaString. | |
| std::string | limastring2utf8stdstring (const Lima::LimaString &phrase, uint32_t size) |
| Convert a wide string to a string , in dest up to size bytes. | |
| std::string | limastring2utf8stdstring (const Lima::LimaString &src) |
| Convert a Lima string to a string. | |
| LimaString | setStringSameEndian (const unsigned short *s, const uint32_t count) |
| redefine an existing LimaString from UTF-16 | |
| LimaString | setStringReverseEndian (const unsigned short *s, const uint32_t count) |
| redefine an existing LimaString from UTF-16 changing the endian mode | |
| LimaString | transcodeToXmlEntities (const LimaString &str) |
| template<typename C > | |
| void | chomp (std::basic_string< C > &str) |
| template<typename C > | |
| void | chop (std::basic_string< C > &str) |
| template<typename charT > | |
| std::string | convertString (const std::basic_string< charT > &input) |
| LIMA_DATA_EXPORT LimaString | setStringSameEndian (const short unsigned int *s, const uint32_t count) |
| LIMA_DATA_EXPORT LimaString | setStringReverseEndian (const short unsigned int *s, const uint32_t count) |
| uint64_t | countLines (std::istream &file) |
| Count the number of lines in the given file from the current position. | |
| uint64_t | countLines (QFile &file) |
| Count the number of lines in the given file from the current position. | |
| void | appendNonEmptyDirs (QStringList &target, const QStringList &source) |
| QString | getEnvVar (const QString &name) |
| QString | getDataHome () |
| void | appendFirstOrSecond (QStringList &target, const QString &path, const QString &alt_path) |
| void | appendFirstOrSecondForProject (QStringList &target, const QString &project, const QString &path_prefix, const QString &path_postfix=QString("")) |
| void | buildDirectoriesListForProject (QStringList &target, const QString &project, const QString &env_postfix, const QString &path_prefix, const QString &path_postfix=QString("")) |
| QStringList | buildConfigurationDirectoriesList (const QStringList &projects=QStringList(), const QStringList &paths=QStringList()) |
| Build a list of configuration directories from a list of project names and a list of paths. | |
| QStringList | buildResourcesDirectoriesList (const QStringList &projects, const QStringList &paths=QStringList()) |
| Build a list of resources directories from a list of project names and a list of paths. | |
| QString | findFileInPaths (const QString &paths, const QString &fileName, const QChar &separator=QLatin1Char(LIMA_PATH_SEPARATOR)) |
| Find the given file in the given paths. | |
| typedef std::vector<std::pair<Position, Length> > Lima::Common::Misc::PositionLengthList |
Definition at line 31 of file positionLengthList.h.
| typedef std::vector<std::string>::const_iterator Lima::Common::Misc::StringPropMultIter |
Definition at line 53 of file genericDocumentProperties.h.
| typedef std::vector<std::pair<std::string,float>>::const_iterator Lima::Common::Misc::WeightedPropMultIter |
Definition at line 54 of file genericDocumentProperties.h.
| void Lima::Common::Misc::appendFirstOrSecond | ( | QStringList & | target, |
| const QString & | path, | ||
| const QString & | alt_path | ||
| ) |
Definition at line 95 of file FileUtils.cpp.
| void Lima::Common::Misc::appendFirstOrSecondForProject | ( | QStringList & | target, |
| const QString & | project, | ||
| const QString & | path_prefix, | ||
| const QString & | path_postfix = QString("") |
||
| ) |
Definition at line 108 of file FileUtils.cpp.
| void Lima::Common::Misc::appendNonEmptyDirs | ( | QStringList & | target, |
| const QStringList & | source | ||
| ) |
Definition at line 64 of file FileUtils.cpp.
| LIMA_COMMONTOOLS_EXPORT QStringList Lima::Common::Misc::buildConfigurationDirectoriesList | ( | const QStringList & | projects = QStringList(), |
| const QStringList & | paths = QStringList() |
||
| ) |
Build a list of configuration directories from a list of project names and a list of paths.
In LIMA the projects list will be empty (or just "lima") but projects depending on LIMA will be able to add their own separate configurations.
If the environment variable LIMA_SHOW_CONFIG_PATH is defined and non-empty, then the list built is written on stderr
| projects | The list of project names to explore |
| paths | The list of paths to look into first. |
Definition at line 141 of file FileUtils.cpp.
| void Lima::Common::Misc::buildDirectoriesListForProject | ( | QStringList & | target, |
| const QString & | project, | ||
| const QString & | env_postfix, | ||
| const QString & | path_prefix, | ||
| const QString & | path_postfix = QString("") |
||
| ) |
Definition at line 118 of file FileUtils.cpp.
| LIMA_COMMONTOOLS_EXPORT QStringList Lima::Common::Misc::buildResourcesDirectoriesList | ( | const QStringList & | projects, |
| const QStringList & | paths = QStringList() |
||
| ) |
Build a list of resources directories from a list of project names and a list of paths.
For each project name "project", try to add the dir from the environment variable $PROJECT_RESOURCES. If it does not exist, try $PROJECT_DIST/share/apps/project/resources. If it does not exist either, try /usr/share/apps/project/resources. Then add existing paths from the given list. In LIMA the projects list will be limited to the single element "lima" but projects depending on LIMA will be able to add their own separate resources.
| projects | The list of project names to explore |
| paths | The list of paths to look into. |
Definition at line 193 of file FileUtils.cpp.
| void Lima::Common::Misc::chomp | ( | std::basic_string< C > & | str | ) |
Definition at line 165 of file strwstrtools.h.
| void Lima::Common::Misc::chop | ( | std::basic_string< C > & | str | ) |
Definition at line 173 of file strwstrtools.h.
| std::string Lima::Common::Misc::convertString | ( | const std::basic_string< charT > & | input | ) |
Definition at line 185 of file strwstrtools.h.
| LIMA_COMMONTOOLS_EXPORT uint64_t Lima::Common::Misc::countLines | ( | QFile & | file | ) |
Count the number of lines in the given file from the current position.
If the last line has no character (no character after the last line break)' it is not counted. After this function, the file is at the same position.
| file | the file to count the lines of |
Definition at line 42 of file FileUtils.cpp.
| LIMA_COMMONTOOLS_EXPORT uint64_t Lima::Common::Misc::countLines | ( | std::istream & | file | ) |
Count the number of lines in the given file from the current position.
If the last line has no character (no character after the last line break)' it is not counted. After this function, the file is in the same good state and at the same position.
| file | the file to count the lines of |
Definition at line 23 of file FileUtils.cpp.
| LIMA_COMMONTOOLS_EXPORT QString Lima::Common::Misc::findFileInPaths | ( | const QString & | paths, |
| const QString & | fileName, | ||
| const QChar & | separator = QLatin1Char(LIMA_PATH_SEPARATOR) |
||
| ) |
Find the given file in the given paths.
| paths | the list of concatenated paths to search the file in |
| fileName | the name of the file to search into the paths. Can include a relative path. Can be a concatenation of several possible file names. Stop on the first file found in the first path |
| separator | the character used to split the list of paths. Defaults to semicolon |
Definition at line 220 of file FileUtils.cpp.
| QString Lima::Common::Misc::getDataHome | ( | ) |
Definition at line 80 of file FileUtils.cpp.
| QString Lima::Common::Misc::getEnvVar | ( | const QString & | name | ) |
Definition at line 75 of file FileUtils.cpp.
| LimaString Lima::Common::Misc::latin15stdstring2limastring | ( | const std::string & | src | ) |
Convert a latin15 string to a LimaString.
Definition at line 212 of file strwstrtools.cpp.
| std::string Lima::Common::Misc::limastring2utf8stdstring | ( | const Lima::LimaString & | phrase, |
| uint32_t | size0 | ||
| ) |
Convert a wide string to a string , in dest up to size bytes.
Definition at line 221 of file strwstrtools.cpp.
| std::string Lima::Common::Misc::limastring2utf8stdstring | ( | const Lima::LimaString & | src | ) |
Convert a Lima string to a string.
Definition at line 226 of file strwstrtools.cpp.
| std::string Lima::Common::Misc::localestring2utf8string | ( | const std::string & | src | ) |
␈rief Convert a string in the locale codepage to a UTF8 string
LIMA own code.
Convert a string in the locale codepage to a UTF8 string
Definition at line 203 of file strwstrtools.cpp.
| bool Lima::Common::Misc::mypredicate | ( | const std::pair< std::string, float > & | a, |
| const std::pair< std::string, float > & | b | ||
| ) |
Definition at line 307 of file genericDocumentProperties.cpp.
| QDebug & Lima::Common::Misc::operator<< | ( | QDebug & | os, |
| const GenericDocumentProperties & | p | ||
| ) |
Definition at line 653 of file genericDocumentProperties.cpp.
| QTextStream & Lima::Common::Misc::operator<< | ( | QTextStream & | os, |
| const GenericDocumentProperties & | p | ||
| ) |
Definition at line 658 of file genericDocumentProperties.cpp.
| std::ostream & Lima::Common::Misc::operator<< | ( | std::ostream & | os, |
| const GenericDocumentProperties & | p | ||
| ) |
Definition at line 648 of file genericDocumentProperties.cpp.
| LIMA_DATA_EXPORT uint64_t Lima::Common::Misc::readCodedInt | ( | std::istream & | file | ) |
read a integer coded in variable-byte format in a file
| file | the file from which to read |
Definition at line 25 of file readwritetools.cpp.
| LIMA_DATA_EXPORT std::string Lima::Common::Misc::readLine | ( | std::istream & | inputFile | ) |
Definition at line 75 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT uint8_t Lima::Common::Misc::readOneByteInt | ( | std::istream & | file | ) |
read a integer coded on one byte in a file
| file | the file from which to read |
Definition at line 65 of file readwritetools.cpp.
| void Lima::Common::Misc::readStream | ( | std::istream & | is, |
| std::string & | dest | ||
| ) |
Read an input stream into a string, until EOF.
Definition at line 51 of file strwstrtools.cpp.
| void Lima::Common::Misc::readString | ( | std::istream & | file, |
| std::string & | s | ||
| ) |
Read an input stream into a wide string, until EOF.
read a string in an input file stream
Definition at line 101 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT void Lima::Common::Misc::readStringField | ( | istream & | file, |
| string & | s | ||
| ) |
Definition at line 127 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT void Lima::Common::Misc::readUTF8StringField | ( | std::istream & | file, |
| Lima::LimaString & | s | ||
| ) |
Binary read an utf8 string from a file and store it in a LimaString.
| file | the file from which to read |
| s | the LimaString read |
Definition at line 153 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT LimaString Lima::Common::Misc::setStringReverseEndian | ( | const short unsigned int * | s, |
| const uint32_t | count | ||
| ) |
| LimaString Lima::Common::Misc::setStringReverseEndian | ( | const unsigned short * | s, |
| const uint32_t | count | ||
| ) |
redefine an existing LimaString from UTF-16 changing the endian mode
Definition at line 255 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT LimaString Lima::Common::Misc::setStringSameEndian | ( | const short unsigned int * | s, |
| const uint32_t | count | ||
| ) |
| LimaString Lima::Common::Misc::setStringSameEndian | ( | const unsigned short * | s, |
| const uint32_t | count | ||
| ) |
redefine an existing LimaString from UTF-16
Definition at line 236 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT LimaString Lima::Common::Misc::transcodeToXmlEntities | ( | const LimaString & | str | ) |
Definition at line 281 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT LimaString Lima::Common::Misc::utf8stdstring2limastring | ( | const std::string & | src | ) |
Definition at line 193 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT void Lima::Common::Misc::writeCodedInt | ( | std::ostream & | file, |
| const uint64_t | number | ||
| ) |
write a integer coded in variable-byte format in a file
| file | the file to write in |
| number | the integer to write |
Definition at line 36 of file readwritetools.cpp.
| LIMA_DATA_EXPORT void Lima::Common::Misc::writeOneByteInt | ( | std::ostream & | file, |
| const uint8_t | number | ||
| ) |
write a integer coded on one byte format in a file
| file | the file to write in |
| number | the integer to write |
Definition at line 72 of file readwritetools.cpp.
| void Lima::Common::Misc::writeStream | ( | std::ostream & | os, |
| const std::string & | src | ||
| ) |
Write a string to an output stream.
Definition at line 64 of file strwstrtools.cpp.
| void Lima::Common::Misc::writeString | ( | ostream & | file, |
| const string & | s | ||
| ) |
write a string on an output file stream
Definition at line 114 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT void Lima::Common::Misc::writeStringField | ( | ostream & | file, |
| const string & | s | ||
| ) |
Definition at line 141 of file strwstrtools.cpp.
| LIMA_DATA_EXPORT void Lima::Common::Misc::writeUTF8StringField | ( | std::ostream & | file, |
| const Lima::LimaString & | s | ||
| ) |
Binary write a a LimaString in a file as an utf8 string.
| file | the file to write in |
| s | the wstring to write |
Definition at line 171 of file strwstrtools.cpp.