Skip to content

Commit c5a366c

Browse files
committed
Doc updates
1 parent fa2f370 commit c5a366c

File tree

4 files changed

+43
-26
lines changed

4 files changed

+43
-26
lines changed

.settings/language.settings.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<configuration id="cdt.managedbuild.config.gnu.cross.lib.release.388924090.1536021794.652448319.1742192579.1428311154.1531651903" name="build_release_link">
44
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
55
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
6-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1761272044696599279" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
6+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-83274525628503538" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
77
<language-scope id="org.eclipse.cdt.core.gcc"/>
88
<language-scope id="org.eclipse.cdt.core.g++"/>
99
</provider>
@@ -15,7 +15,7 @@
1515
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1616
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1717
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
18-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1238172962799616808" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
18+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-135027059527360970" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
1919
<language-scope id="org.eclipse.cdt.core.gcc"/>
2020
<language-scope id="org.eclipse.cdt.core.g++"/>
2121
</provider>
@@ -26,7 +26,7 @@
2626
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
2727
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
2828
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
29-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1238172962799616808" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
29+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-135027059527360970" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
3030
<language-scope id="org.eclipse.cdt.core.gcc"/>
3131
<language-scope id="org.eclipse.cdt.core.g++"/>
3232
</provider>
@@ -37,7 +37,7 @@
3737
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
3838
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
3939
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
40-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1238172962799616808" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
40+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-135027059527360970" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
4141
<language-scope id="org.eclipse.cdt.core.gcc"/>
4242
<language-scope id="org.eclipse.cdt.core.g++"/>
4343
</provider>
@@ -48,7 +48,7 @@
4848
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
4949
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
5050
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
51-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1238172962799616808" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
51+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-135027059527360970" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
5252
<language-scope id="org.eclipse.cdt.core.gcc"/>
5353
<language-scope id="org.eclipse.cdt.core.g++"/>
5454
</provider>

include/ui/TabBar.hpp

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,27 @@ class TabBar : public Element, public ListAttr {
2424
/*! \details Tab Bar construction */
2525
TabBar();
2626

27-
/*! \details Access the height of the tab bar as a ratio to Drawing::scale() */
27+
/*! \details Access the height of the tab bar as a ratio to draw::Drawing::scale() */
2828
sg_size_t h() const { return m_height; }
2929

30-
/*! \details Set the height of the tab bar where Drawing::scale() height will set the height
30+
/*! \details Set the height of the tab bar where draw::Drawing::scale() height will set the height
3131
* to fill the entire screen.
3232
*
33-
* @param h Height of the tab bar as a ratio to Drawing::scale()
33+
* @param h Height of the tab bar as a ratio to draw::Drawing::scale()
3434
*
3535
*/
3636
void set_height(sg_size_t h){ m_height = h; }
3737

38+
/*! \details Access the currently highlighted tab */
3839
sg_size_t highlight() const { return m_highlight; }
40+
41+
/*! \details Set the value of the currently highlighted tab */
3942
void set_highlight(sg_size_t h){ m_highlight = h; }
4043

4144
Element * handle_event(const Event & event, const draw::DrawingAttr & attr);
4245
void draw(const draw::DrawingAttr & attr);
4346

44-
/*! \details This method access a refernence
47+
/*! \details This method accesses a reference
4548
* to the tab at the specified offset. This
4649
* method must be implemented by a class that inherits
4750
* ui::TabBar.
@@ -50,6 +53,8 @@ class TabBar : public Element, public ListAttr {
5053
* @return A reference to the tab at the specified offset.
5154
*/
5255
virtual Tab & at(list_attr_size_t i) = 0;
56+
57+
/*! \details Access a reference to the current tab (same as as(selected())) */
5358
Tab & current(){ return at(selected()); }
5459

5560
void set_animation_type(u8 v);
@@ -59,11 +64,15 @@ class TabBar : public Element, public ListAttr {
5964

6065
draw::Animation & animation(){ return m_animation; }
6166

67+
/*! \details Access whether bouncing left is enabled */
6268
bool is_bounce_left_enabled() const { return flag(FLAG_BOUNCE_LEFT_ENABLE); }
69+
/*! \details Set whether the tab should bounce on trying to go left on the left-most tab */
6370
void set_bounce_left_enabled(bool v = true){ set_flag(FLAG_BOUNCE_LEFT_ENABLE, v); }
6471

65-
bool is_bounce_right_enabled() const { return flag(FLAG_BOUNCE_LEFT_ENABLE); }
66-
void set_bounce_right_enabled(bool v = true){ set_flag(FLAG_BOUNCE_LEFT_ENABLE, v); }
72+
/*! \details Access whether bouncing right is enabled */
73+
bool is_bounce_right_enabled() const { return flag(FLAG_BOUNCE_RIGHT_ENABLE); }
74+
/*! \details Set whether the tab should bounce on trying to go right on the right-most tab */
75+
void set_bounce_right_enabled(bool v = true){ set_flag(FLAG_BOUNCE_RIGHT_ENABLE, v); }
6776

6877
protected:
6978
void draw_tab_bar(const draw::DrawingAttr & attr, int selected);

include/var/Token.hpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ class Token : public String {
2929
Token(const char * src, const char * delim, const char * ignore = 0, bool count_empty = false);
3030

3131

32+
/*! \details Sorting Options */
3233
enum sort_options {
33-
SORT_NONE,
34-
SORT_AZ,
35-
SORT_ZA
34+
SORT_NONE /*! Don't sort */,
35+
SORT_AZ /*! Sort from A to Z */,
36+
SORT_ZA /*! Sort from Z to A */
3637
};
3738

3839

@@ -53,6 +54,8 @@ class Token : public String {
5354
*/
5455
void parse(const char * delim, const char * ignore = 0);
5556

57+
58+
/*! \details This method sorts the tokens as specified */
5659
void sort(enum sort_options sort_option = SORT_NONE);
5760

5861

@@ -67,8 +70,13 @@ class Token : public String {
6770
return belongs_to(c, str, strlen(str));
6871
}
6972

70-
bool count_empty_tokens() const { return m_count_empty_tokens; }
71-
void set_count_empty_tokens(bool v = true){ m_count_empty_tokens = v; }
73+
bool count_empty_tokens() const { return m_is_count_empty_tokens; }
74+
75+
/*! \details Access whether or not parse() will count empty tokens */
76+
bool is_count_empty_tokens() const { return m_is_count_empty_tokens; }
77+
78+
/*! \details Set whether or not parse() should include empty tokens */
79+
void set_count_empty_tokens(bool v = true){ m_is_count_empty_tokens = v; }
7280

7381

7482
Token& operator=(const Token & token);
@@ -79,7 +87,7 @@ class Token : public String {
7987
void init_members();
8088
unsigned int m_num_tokens;
8189
unsigned int m_string_size;
82-
bool m_count_empty_tokens;
90+
bool m_is_count_empty_tokens;
8391

8492

8593
};

src/var/Token.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ using namespace var;
88

99
Token::Token(){
1010
init_members();
11-
m_count_empty_tokens = false;
11+
m_is_count_empty_tokens = false;
1212
}
1313

1414
Token::Token(char * mem, size_t s, const char * src, const char * delim, const char * ignore, bool count_empty) : String(mem, s, false){
1515
init_members();
16-
m_count_empty_tokens = count_empty;
16+
m_is_count_empty_tokens = count_empty;
1717
clear(); assign(src); parse(delim, ignore);
1818
}
1919

2020
Token::Token(const char * src, const char * delim, const char * ignore, bool count_empty) : String(src){
2121
init_members();
22-
m_count_empty_tokens = count_empty;
22+
m_is_count_empty_tokens = count_empty;
2323
parse(delim, ignore);
2424
}
2525

@@ -55,7 +55,7 @@ void Token::parse(const char * delim, const char * ignore){
5555
p = cdata();
5656
m_string_size = String::size();
5757
end = p + m_string_size;
58-
if( m_count_empty_tokens == true ){
58+
if( m_is_count_empty_tokens == true ){
5959
m_num_tokens++;
6060
}
6161
while( p < end ){
@@ -75,13 +75,13 @@ void Token::parse(const char * delim, const char * ignore){
7575
//check to see if the current character is part of the delimiter string
7676
if( belongs_to(*p, delim, len0) ){
7777
*p = 0; //set the character to zero
78-
if( m_count_empty_tokens == true ){
78+
if( m_is_count_empty_tokens == true ){
7979
m_num_tokens++;
8080
}
8181
}
8282

8383
//check for an empty token
84-
if( m_count_empty_tokens == false ){
84+
if( m_is_count_empty_tokens == false ){
8585
if( *p != 0 ){
8686
if( on_token == false ){
8787
m_num_tokens++;
@@ -102,11 +102,11 @@ const char * Token::at(size_t n) const {
102102
unsigned int token = 0;
103103
p = c_str();
104104

105-
if( m_num_tokens <= n ){
105+
if( n >= size() ){
106106
return 0;
107107
}
108108

109-
if( m_count_empty_tokens ){
109+
if( m_is_count_empty_tokens ){
110110
while( token != n ){
111111
if( *p == 0 ){
112112
token++;
@@ -202,7 +202,7 @@ Token & Token::operator=(const Token & token){
202202
memcpy(data(), token.data_const(), token.capacity());
203203
m_num_tokens = token.m_num_tokens;
204204
m_string_size = token.m_string_size;
205-
m_count_empty_tokens = token.m_count_empty_tokens;
205+
m_is_count_empty_tokens = token.m_is_count_empty_tokens;
206206
return *this;
207207
}
208208

0 commit comments

Comments
 (0)