mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
37 lines
560 B
C++
37 lines
560 B
C++
#include "static_page_file.h"
|
|
|
|
#include "web/file_cache.h"
|
|
#include "web/html/html_builder.h"
|
|
#include "web/http/request.h"
|
|
|
|
void StaticPageFile::load() {
|
|
if (file_path == "") {
|
|
return;
|
|
}
|
|
|
|
if (process_if_can) {
|
|
load_and_process_file(file_path);
|
|
} else {
|
|
load_file(file_path);
|
|
}
|
|
}
|
|
|
|
void StaticPageFile::_notification(const int what) {
|
|
switch (what) {
|
|
case NOTIFICATION_ENTER_TREE:
|
|
load();
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
StaticPageFile::StaticPageFile() :
|
|
StaticPage() {
|
|
|
|
process_if_can = true;
|
|
}
|
|
|
|
StaticPageFile::~StaticPageFile() {
|
|
}
|