mdBook/book-example/assets/images/structs-v0-0-16.pum

120 lines
1.8 KiB
Plaintext
Raw Normal View History

@startuml
namespace book {
class MDBook {
project_root: PathBuf,
template_dir: PathBuf,
2017-01-14 01:14:26 +08:00
src_base: PathBuf,
dest_base: PathBuf,
render_intent: RenderIntent,
translations: HashMap<String, Book>,
indent_spaces: i32,
2017-01-14 01:14:26 +08:00
pub livereload_script: Option<String>,
new(project_root)
}
class book::Book {
config: BookConfig,
toc: Vec<TocItem>,
new(project_root)
}
class book::Chapter {
2017-01-14 01:14:26 +08:00
pub title: String,
pub content: Option<String>,
src_path: Option<PathBuf>,
dest_path: Option<PathBuf>,
2017-01-14 01:14:26 +08:00
pub translation_links: Option<Vec<TranslationLink>>,
pub authors: Option<Vec<Author>>,
pub translators: Option<Vec<Author>>,
pub description: Option<String>,
pub css_class: Option<String>,
new(title, src_path)
}
}
namespace book::bookconfig {
class BookConfig {
2017-01-14 01:14:26 +08:00
pub dest: PathBuf,
pub src: PathBuf,
pub title: String,
pub subtitle: Option<String>,
pub description: Option<String>,
pub language: Language,
pub authors: Vec<Author>,
pub translators: Option<Vec<Author>>,
pub publisher: Option<Publisher>,
pub number_format: NumberFormat,
pub section_names: Vec<String>,
pub is_main_book: bool,
pub is_multilang: bool,
new(project_root)
}
class Author {
name: String,
file_as: String,
email: Option<String>,
new(name)
}
class Language {
name: String,
code: String,
new(name, code)
}
class Publisher {
name: String,
url: Option<String>,
logo_src: Option<PathBuf>,
new(name)
}
enum NumberFormat {
Arabic
Roman
Word
}
}
namespace book::toc {
class TocContent {
2017-01-14 01:14:26 +08:00
pub chapter: Chapter,
pub sub_items: Option<Vec<TocItem>>,
pub section: Option<Vec<i32>>,
}
enum TocItem {
Numbered "TocContent",
Unnumbered "TocContent",
Unlisted "TocContent",
Spacer,
}
}
class Renderer {
build(&self, project_root: &PathBuf),
render(&self, book_project: &MDBook),
}
@enduml