Samchon Framework for CPP  1.0.0
FTFile.cpp
1 #include <samchon/library/FTFile.hpp>
2 #include <samchon/library/FTFactory.hpp>
3 
4 #include <samchon/library/XML.hpp>
5 
6 using namespace std;
7 
8 using namespace samchon;
9 using namespace samchon::library;
10 using namespace samchon::protocol;
11 
12 FTFile::FTFile(FTFolder *parent)
13  : super(parent)
14 {
15 }
16 void FTFile::construct(shared_ptr<XML> xml)
17 {
18  super::construct(xml);
19 
20  extension = xml->getProperty("extension");
21 }
22 
23 auto FTFile::getExtension() const -> string
24 {
25  return extension;
26 }
27 
28 auto FTFile::toXML() const -> shared_ptr<XML>
29 {
30  shared_ptr<XML> &xml = super::toXML();
31  xml->setProperty("extension", extension);
32 
33  return xml;
34 }
An interface of file-tree.
Definition: FTInstance.hpp:22
Definition: RWMutex.hpp:4
Package of libraries.
Definition: library.hpp:84
virtual auto toXML() const -> std::shared_ptr< library::XML >
Get an XML object represents the Entity.
Definition: FTFile.cpp:28
Package of network protocol and libraries.
Definition: protocol.hpp:185
virtual auto toXML() const -> std::shared_ptr< library::XML >
Get an XML object represents the Entity.
Definition: FTInstance.cpp:46
auto getExtension() const -> std::string
Get extension.
Definition: FTFile.cpp:23
std::string extension
An extension of a file.
Definition: FTFile.hpp:31
XML is a class representing xml object.
Definition: XML.hpp:72
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7