Improve:FilesManager include cleaner.
This commit is contained in:
parent
7619c74561
commit
6bb8c76751
|
@ -14,9 +14,9 @@
|
||||||
*/
|
*/
|
||||||
#ifndef FILES_DATABASE_H
|
#ifndef FILES_DATABASE_H
|
||||||
#define FILES_DATABASE_H
|
#define FILES_DATABASE_H
|
||||||
#include "StatusCode.h"
|
|
||||||
#include "FilesHandle.h"
|
#include "FilesHandle.h"
|
||||||
#include "IFilesManager.h"
|
#include "IFilesManager.h"
|
||||||
|
#include "StatusCode.h"
|
||||||
class FilesDatabase : public FilesHandle
|
class FilesDatabase : public FilesHandle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -14,17 +14,14 @@
|
||||||
*/
|
*/
|
||||||
#include "FilesHandle.h"
|
#include "FilesHandle.h"
|
||||||
#include "ILog.h"
|
#include "ILog.h"
|
||||||
#include <algorithm>
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <fstream>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <sys/stat.h>
|
#include <string>
|
||||||
#include <sys/types.h>
|
|
||||||
std::string FilesHandle::CreateFilePathName(const std::string &sourceFile)
|
std::string FilesHandle::CreateFilePathName(const std::string &sourceFile)
|
||||||
{
|
{
|
||||||
const std::string ERROR_SUFFIX = "";
|
const std::string ERROR_SUFFIX = "";
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
#include "FilesManagerImpl.h"
|
#include "FilesManagerImpl.h"
|
||||||
#include "IStorageManager.h"
|
#include "IFilesManager.h"
|
||||||
|
// #include "IStorageManager.h"
|
||||||
|
#include "FilesDatabase.h"
|
||||||
|
#include "StatusCode.h"
|
||||||
StatusCode FilesManagerImpl::Init(void)
|
StatusCode FilesManagerImpl::Init(void)
|
||||||
{
|
{
|
||||||
FilesDatabase::Init();
|
FilesDatabase::Init();
|
||||||
|
|
|
@ -13,8 +13,11 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
#include "FilesManagerMakePtr.h"
|
#include "FilesManagerMakePtr.h"
|
||||||
#include "ILog.h"
|
|
||||||
#include "FilesManagerImpl.h"
|
#include "FilesManagerImpl.h"
|
||||||
|
#include "IFilesManager.h"
|
||||||
|
#include "ILog.h"
|
||||||
|
#include "StatusCode.h"
|
||||||
|
#include <memory>
|
||||||
bool CreateFilesManagerModule(void)
|
bool CreateFilesManagerModule(void)
|
||||||
{
|
{
|
||||||
auto instance = std::make_shared<IFilesManager>();
|
auto instance = std::make_shared<IFilesManager>();
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
*/
|
*/
|
||||||
#include "IFilesManager.h"
|
#include "IFilesManager.h"
|
||||||
#include "ILog.h"
|
#include "ILog.h"
|
||||||
|
#include "StatusCode.h"
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
save_file_info::save_file_info(const std::string &fileName) : mFileName(fileName)
|
save_file_info::save_file_info(const std::string &fileName) : mFileName(fileName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,13 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
#include "FilesDatabase.h"
|
#include "FilesDatabase.h"
|
||||||
|
#include "FilesHandle.h"
|
||||||
|
#include "IFilesManager.h"
|
||||||
#include "ILog.h"
|
#include "ILog.h"
|
||||||
#include "IStorageManager.h"
|
#include "IStorageManager.h"
|
||||||
#include "SqliteHandle.h"
|
#include "SqliteHandle.h"
|
||||||
|
#include "StatusCode.h"
|
||||||
|
#include <string>
|
||||||
void FilesDatabase::Init(void)
|
void FilesDatabase::Init(void)
|
||||||
{
|
{
|
||||||
SqliteHandle::GetInstance()->Init();
|
SqliteHandle::GetInstance()->Init();
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include "SqliteHandle.h"
|
#include "SqliteHandle.h"
|
||||||
#include "ILog.h"
|
#include "ILog.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
|
#include <memory>
|
||||||
|
#include <stdio.h>
|
||||||
std::shared_ptr<SqliteHandle> &SqliteHandle::GetInstance(std::shared_ptr<SqliteHandle> *impl)
|
std::shared_ptr<SqliteHandle> &SqliteHandle::GetInstance(std::shared_ptr<SqliteHandle> *impl)
|
||||||
{
|
{
|
||||||
static auto instance = std::make_shared<SqliteHandle>();
|
static auto instance = std::make_shared<SqliteHandle>();
|
||||||
|
@ -31,7 +33,7 @@ std::shared_ptr<SqliteHandle> &SqliteHandle::GetInstance(std::shared_ptr<SqliteH
|
||||||
}
|
}
|
||||||
void SqliteHandle::Init(void)
|
void SqliteHandle::Init(void)
|
||||||
{
|
{
|
||||||
sqlite3 *db;
|
sqlite3 *db;
|
||||||
int rc;
|
int rc;
|
||||||
rc = sqlite3_open("test.db", &db);
|
rc = sqlite3_open("test.db", &db);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
@ -42,5 +44,4 @@ void SqliteHandle::Init(void)
|
||||||
}
|
}
|
||||||
void SqliteHandle::UnInit(void)
|
void SqliteHandle::UnInit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user