Skip to content

Commit 928e152

Browse files
UPD: Updated documentation
1 parent 3f6a3e2 commit 928e152

File tree

5 files changed

+60
-31
lines changed

5 files changed

+60
-31
lines changed

documentation/smcore/about.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,26 @@ namespace smos
1515
{
1616
namespace smcore
1717
{
18-
class SMCORE_EXPORT About
18+
class About
1919
{
2020
public:
2121
/**
2222
* @brief Get the about text
2323
*
2424
* @return QString
2525
*/
26-
static QString getAbout(void);
26+
static smos::smcore::SMSring getAbout(void);
2727
};
2828
}
2929
}
30-
3130
```
3231

3332
### Usage
3433

3534
```c++
3635
#include "about.h"
3736

38-
QString about = smos::smcore::About::getAbout();
37+
smos::smcore::SMSring about = smos::smcore::About::getAbout();
3938
```
4039

4140
[smabout]: ./About%20SourceMonitor.png

documentation/smcore/license.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,27 @@ namespace smos
1313
{
1414
namespace smcore
1515
{
16-
class SMCORE_EXPORT License
16+
class License
1717
{
1818
public:
1919
/**
2020
* @brief Get the license text
2121
*
22-
* @return QString
22+
* @return smos::smcore::SMSring
2323
*/
24-
static QString getLicense(void);
25-
}
24+
static smos::smcore::SMSring getLicense(void);
25+
};
2626
}
2727
}
28+
2829
```
2930

3031
### Usage
3132

3233
```c++
3334
#include "license.h"
3435

35-
QString license = smos::smcore::License::getLicense();
36+
smos::smcore::SMSring license = smos::smcore::License::getLicense();
3637
```
3738

3839
## Possible issues

documentation/smcore/options.md

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,60 +20,50 @@ namespace smos
2020
{
2121
namespace smcore
2222
{
23-
class SMCORE_EXPORT SMOptions
23+
class Options
2424
{
2525
public:
2626
/**
2727
* @brief Default constructor
2828
*
2929
* @param optionsfile Name of options file
3030
*/
31-
SMOptions(QString optionsfile);
31+
Options(smos::smcore::SMSring optionsfile);
3232

3333
/**
3434
* @brief Default destructor
3535
*
3636
*/
37-
~SMOptions(void);
38-
39-
/**
40-
* @brief Load options from INI file
41-
*/
42-
void optionsLoad(void);
43-
44-
/**
45-
* @brief Save options to INI file
46-
*/
47-
void optionsSave(void);
37+
~Options(void);
4838

4939
/**
5040
* @brief Get the editor call with filename templated
5141
*
52-
* @return QString
42+
* @return smos::smcore::SMSring
5343
*/
54-
QString codeEditorGet(void);
44+
smos::smcore::SMSring codeEditorGet(void);
5545

5646
/**
5747
* @brief Get the editor call with filename templated
5848
*
59-
* @return QString
49+
* @param codeeditor smos::smcore::SMSring
6050
*/
61-
void codeEditorSet(QString codeeditor);
51+
void codeEditorSet(smos::smcore::SMSring codeeditor);
6252

6353
/**
6454
* @brief Get the absolute path to the logfile
6555
*
66-
* @return QString The absolute path to the logfile
56+
* @return smos::smcore::SMSring The absolute path to the logfile
6757
*/
68-
QString logfileNameGet(void);
58+
smos::smcore::SMSring logfileNameGet(void);
6959

7060
/**
7161
* @brief Set the name (and path) of the logfile
7262
*
7363
* @param logfileName Name (and path) of the logfile to use
7464
*/
75-
void logfileNameSet(QString logfileName);
76-
}
65+
void logfileNameSet(smos::smcore::SMSring logfileName);
66+
};
7767
}
7868
}
7969
```
@@ -85,7 +75,7 @@ namespace smos
8575
8676
smos::smcore::SMSettings settings = smos::smcore::SMSettings("smos_core.ini");
8777
88-
QString logfileOld = settings.logfileNameGet();
78+
smos::smcore::SMSring logfileOld = settings.logfileNameGet();
8979
settings.logfileNameSet("logfilenew.log");
9080
```
9181

documentation/smcore/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
- [About][doc_about]
44
- [License][doc_license]
55
- [Options][doc_options]
6+
- [SMString][doc_smstring]
67

78
[doc_about]: ./about.md
89
[doc_license]: ./license.md
910
[doc_options]: ./options.md
11+
[doc_smstring]: ./smstring.md

documentation/smcore/smstring.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# The smstring object
2+
3+
WTF?! There are so much possibilities for using strings in C++ - don't know how to do a wise decision for stalbe use. There are a few possibilities
4+
5+
- std::string
6+
- std::wstring
7+
- [ICU][lib_icu]
8+
9+
We have to keep always in mind that the source code could contain comments or variables in local languages. Imagine source code in Arabic (from right to left, from top to bottom), Chinese (from left to right, from top to bottom), Hebrew (from right to left, from top to bottom), Japanese (from right to left, from top to bottom) or Thai (from left to right, from top to bottom) - it will not be easy to deal with such source code.
10+
11+
## Implementation
12+
13+
This is a functionality of `smcore` and located in `smcore/smstring.*`.
14+
15+
The decision of which kind of string handling is moved to the future. To enable the project for working a simple `typedef` on `std::string` is used as placeholder for the future implementation. Of course this is not safe for the future but better than nothing.
16+
17+
### Public API
18+
19+
```c++
20+
namespace smos
21+
{
22+
namespace smcore
23+
{
24+
typedef std::string SMSring;
25+
}
26+
}
27+
```
28+
29+
### Usage
30+
31+
```c++
32+
#include "smstring.h"
33+
34+
smos::smcore::SMString message = "Hello world";
35+
```
36+
37+
[lib_icu]: https://icu.unicode.org/design/cpp

0 commit comments

Comments
 (0)