#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <Wt/WApplication>
#include <Wt/WContainerWidget>
#include <Wt/WEnvironment>
#include <Wt/WLineEdit>
#include <Wt/WGridLayout>
#include <Wt/WHBoxLayout>
#include <Wt/WPushButton>
#include <Wt/WTable>
#include <Wt/WText>
#include <Wt/WTreeView>
#include <Wt/WVBoxLayout>
#include <Wt/WViewWidget>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/exception.hpp>
#include <boost/filesystem/convenience.hpp>
#include <boost/algorithm/string.hpp>
#include "ExampleSourceViewer.h"
#include "FileItem.h"
Go to the source code of this file.
|
static std::string | filename (const fs::path &p) |
|
static std::string | stem (const fs::path &p) |
|
fs::path | parent_path (const fs::path &p) |
|
static bool | comparePaths (const fs::path &p1, const fs::path &p2) |
|
static fs::path | getCompanion (const fs::path &path) |
|
◆ comparePaths()
static bool comparePaths |
( |
const fs::path & |
p1, |
|
|
const fs::path & |
p2 |
|
) |
| |
|
static |
◆ filename()
static std::string filename |
( |
const fs::path & |
p | ) |
|
|
static |
Definition at line 36 of file ExampleSourceViewer.C.
38 #if BOOST_FILESYSTEM_VERSION < 3 39 return p.empty() ? std::string() : *--p.end();
41 return p.empty() ? std::string() : (*--p.end()).string();
◆ getCompanion()
static fs::path getCompanion |
( |
const fs::path & |
path | ) |
|
|
static |
Definition at line 182 of file ExampleSourceViewer.C.
184 std::string ext = fs::extension(path);
188 else if (ext ==
".C" || ext ==
".cpp")
static std::string stem(const fs::path &p)
fs::path parent_path(const fs::path &p)
◆ parent_path()
fs::path parent_path |
( |
const fs::path & |
p | ) |
|
Definition at line 58 of file ExampleSourceViewer.C.
61 std::string path = p.string();
63 return path.substr(0, path.length() - fn.length() - 1);
static std::string filename(const fs::path &p)
◆ stem()
static std::string stem |
( |
const fs::path & |
p | ) |
|
|
static |
Definition at line 46 of file ExampleSourceViewer.C.
49 std::size_t pos = fn.find(
'.');
50 if (pos == std::string::npos)
53 return fn.substr(0, pos);
static std::string filename(const fs::path &p)