mdBook/book-example/assets/images/structs-v0-0-16.pum
2017-01-13 17:14:26 +00:00

120 lines
1.8 KiB
Plaintext

@startuml
namespace book {
class MDBook {
project_root: PathBuf,
template_dir: PathBuf,
src_base: PathBuf,
dest_base: PathBuf,
render_intent: RenderIntent,
translations: HashMap<String, Book>,
indent_spaces: i32,
pub livereload_script: Option<String>,
new(project_root)
}
class book::Book {
config: BookConfig,
toc: Vec<TocItem>,
new(project_root)
}
class book::Chapter {
pub title: String,
pub content: Option<String>,
src_path: Option<PathBuf>,
dest_path: Option<PathBuf>,
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 {
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 {
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