Skip to content

Commit

Permalink
先提交2.0.0版本的文档
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Apr 6, 2019
1 parent 2871b2d commit 51685b2
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.fontFamily": "Noto Sans Mono CJK SC, YaHei Consolas Hybrid,Source Code Pro,Microsoft YaHei,Consolas,serif",
"editor.fontSize": 16,
"restructuredtext.builtDocumentationPath": "${workspaceRoot}/build/html",
"restructuredtext.confPath": "${workspaceRoot}/source",
"restructuredtext.confPath": "${workspaceFolder}\\source",
"restructuredtext.linter.extraArgs": [],
"files.associations": {
"*.ejs": "html",
Expand Down
13 changes: 8 additions & 5 deletions py3env.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/bash

SCRIPT_DIR="$(dirname $0)";
SCRIPT_DIR="$(dirname "$0")";
SCRIPT_DIR="$(cd "$SCRIPT_DIR" && pwd)";

if [ ! -e "$SCRIPT_DIR/py3env/bin/pip3" ]; then
virtualenv -p "$(which python3)" "$SCRIPT_DIR/py3env";
export PATH=$SCRIPT_DIR/py3env/bin:$PATH;
export PATH=$SCRIPT_DIR/py3env/bin:$PATH ;
pip install --upgrade pip setuptools ;
pip install --upgrade -r "$SCRIPT_DIR/requirements.txt" ;
echo "#!/bin/bash
export export PATH=$SCRIPT_DIR/py3env/bin:\$PATH;
" > $SCRIPT_DIR/py3env/source.sh ;
fi

echo "#!/bin/bash
export PATH=$SCRIPT_DIR/py3env/bin:\$PATH ;
" > $SCRIPT_DIR/py3env/source.sh ;

21 changes: 14 additions & 7 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# -- Project information -----------------------------------------------------

project = 'xresloader-document'
copyright = '2018, owent'
copyright = '2019, owent'
author = 'owent'

# The short X.Y version
Expand Down Expand Up @@ -67,12 +67,15 @@
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = ['.rst', '.md']
#source_suffix = ['.rst', '.md']
#add_source_suffix('.rst', 'restructuredtext')
#add_source_suffix('.md', 'markdown')
# source_suffix = '.rst'

source_parsers = {
'.md': CommonMarkParser,
}
#source_parsers = {
# '.md': CommonMarkParser,
#}
#add_source_parser(CommonMarkParser)

# The master toctree document.
master_doc = 'index'
Expand Down Expand Up @@ -102,7 +105,7 @@
html_theme = 'cloud'

# set the theme path to point to cloud's theme data
# html_theme_path = [csp.get_theme_dir()]
html_theme_path = [csp.get_theme_dir()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -231,4 +234,8 @@

# custom styles
def setup(app):
app.add_stylesheet('css/custom.css') # may also be an URL
app.add_stylesheet('css/custom.css') # may also be an URL
app.add_source_suffix('.rst', 'restructuredtext')
app.add_source_suffix('.md', 'markdown')
app.add_source_parser(CommonMarkParser)

2 changes: 1 addition & 1 deletion source/sample/quick_start/sample-code/libresloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace xresloader {
public:
typedef std::tuple<TKey...> key_type;
typedef std::shared_ptr<TItem> value_type;
typedef com::owent::xresloader::pb::xresloader_datablocks proto_type;
typedef org::xresloader::pb::xresloader_datablocks proto_type;

typedef std::function<key_type(value_type)> func_type;
typedef std::function<bool(const value_type&)> filter_func_type;
Expand Down
4 changes: 2 additions & 2 deletions source/sample/quick_start/sample-code/load_custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ int main(int argc, char* argv[]) {
return 1;
}

com::owent::xresloader::pb::xresloader_datablocks data_wrapper;
org::xresloader::pb::xresloader_datablocks data_wrapper;
std::fstream fin;
fin.open(file_path, std::ios::in | std::ios::binary);
if (!fin.is_open()) {
printf("open %s failed\n", file_path);
return 1;
}
if (false == data_wrapper.ParseFromIstream(&fin)) {
printf("parse com::owent::xresloader::pb::xresloader_datablocks failed. %s\n", data_wrapper.InitializationErrorString().c_str());
printf("parse org::xresloader::pb::xresloader_datablocks failed. %s\n", data_wrapper.InitializationErrorString().c_str());
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion source/users/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Windows下控制台里执行执行会报文件编码错误?(java.nio.charset
+ 第二种: 在powershell里执行


C++加载代码编译时出现xresloader符号重定义(multiple definition of ``com::owent::xresloader::pb::xresloader_XXX)``
C++加载代码编译时出现xresloader符号重定义(multiple definition of ``org::xresloader::pb::xresloader_XXX)``
---------------------------------------------------------------------------------------------------------------------
pb_header.pb.cc 和 pb_header_v3.pb.cc 只能保留一个

Expand Down

0 comments on commit 51685b2

Please sign in to comment.