#pragma once #include "MarkdownContentParser.h" #include "File.h" #include "String.h" #include #include class MarkdownDocument; class ContentFile { public: using FileMetadata = std::unordered_map; using FileContentBody = Vector; ContentFile(const Path& filename); virtual ~ContentFile(); Path getFilename() const; virtual void load(); String getMetadataItem(const String& key) const; virtual String getOutputLocation() const; MarkdownDocument* getContentBody() const { return mContentBody.get(); } void doLinkTagSubstitution(const Path& basePath); void write(const Path& path); void setProcessedOutput(const String& output) { mProcessedOutput = output; } protected: Path mFilename; FileMetadata mMetadata; Ptr mContentBody; String mProcessedOutput; }; class ContentArticle : public ContentFile { public: ContentArticle(const Path& filename) : ContentFile(filename) { } void load() override { ContentFile::load(); } };