mdBook/doc/assets/structs-reorganized.pum

130 lines
1.6 KiB
Plaintext
Raw Normal View History

2016-12-25 12:40:37 +08:00
@startuml
class book::MDBook {
project_root : PathBuf
books : HashMap<&'a str, Book>
renderer : Box<Renderer>
livereload : Option<String>
indent_spaces: i32
multilingual: bool
new(root)
}
class book::book.Book {
config : BookConfig
metadata : BookMetadata
chapters: Vec<Chapter>
new(title)
}
class book::bookconfig.BookConfig {
lang : Language
project_root : PathBuf
book_dest : PathBuf
book_src : PathBuf
template_path : PathBuf
new(root)
}
class book::chapter.Chapter {
title
file
author
description
css_class
index : Vec<i32>
new(title, file)
}
namespace book::toc {
class TocItem {
content : TocContent
sub_items: Vec<TocItem>
new(content)
}
enum TocContent {
Frontmatter "Chapter"
Mainmatter "Chapter"
Backmatter "Chapter"
Insert "Chapter"
Spacer
}
}
namespace book::metadata {
class BookMetadata {
title
subtitle
description
publisher
language
authors
translators
number_format
section_names
new(title)
}
class Author {
name
email
new(name)
}
class Language {
name
code
}
class Publisher {
name
url
logo_src
}
enum NumberFormat {
Arabic
Roman
Word
}
}
class renderer::html_handlebars::HtmlHandlebars {
new()
render(book: MDBook)
}
class theme::Theme {
index
css
favicon
js
highlight_css
tomorrow_night_css
highlight_js
jquery
new(src)
}
book::book-[hidden]->book::bookconfig
book::book-[hidden]->book::chapter
book::book-[hidden]->book::toc
book::book-[hidden]->book::metadata
renderer::html_handlebars::HtmlHandlebars-[hidden]->theme::Theme
@enduml