|
Samchon Framework for CPP
1.0.0
|
A file. More...
#include <FTFile.hpp>

Public Member Functions | |
| FTFile (FTFolder *) | |
| Construct from parent folder. More... | |
| auto | getExtension () const -> std::string |
| Get extension. More... | |
| virtual auto | toXML () const -> std::shared_ptr< library::XML > |
| Get an XML object represents the Entity. More... | |
Public Member Functions inherited from samchon::library::FTInstance | |
| FTInstance (FTFolder *) | |
| Construct from parent folder. More... | |
| virtual auto | key () const -> std::string |
| Get a key that can identify the Entity uniquely. More... | |
| auto | getUID () const -> int |
| Get uid. More... | |
| auto | getParent () const -> FTFolder * |
| Get parent folder. More... | |
| auto | getName () const -> std::string |
| Get name. More... | |
| auto | getComment () const -> std::string |
| Get comment. More... | |
Public Member Functions inherited from samchon::protocol::Entity | |
| Entity () | |
| Default Constructor. More... | |
| virtual void | construct (std::shared_ptr< library::XML >)=0 |
| Construct data of the Entity from an XML object. More... | |
Protected Attributes | |
| std::string | extension |
| An extension of a file. More... | |
Protected Attributes inherited from samchon::library::FTInstance | |
| FTFolder * | parent |
| Parent folder containing the instance. More... | |
| int | uid |
| Key, an unique id of file. More... | |
| std::string | name |
| Name of the file. More... | |
| std::string | comment |
| Comment of the file. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from samchon::library::FTInstance | |
| virtual auto | TAG () const -> std::string |
| A tag name when represented by XML. More... | |
A file.
An abstract class represents a file instance with extension.
Definition at line 20 of file FTFile.hpp.
| FTFile::FTFile | ( | FTFolder * | parent | ) |
Construct from parent folder.
| folder | Belonged folder |
Definition at line 12 of file FTFile.cpp.
References extension.
| auto FTFile::getExtension | ( | ) | const -> std::string |
|
virtual |
Get an XML object represents the Entity.
Returns an XML object that can represents the Entity containing member variables into properties.
A member variable (not object, but atomic value like number, string or date) is categorized as a property within the framework of entity side. Thus, when overriding a toXML() method and archiving member variables to an XML object to return, puts each variable to be a property belongs to only an XML object.
Don't archive the member variable of atomic value to XML::value causing enormouse creation of XML objects to number of member variables. An Entity must be represented by only an XML instance (tag).
| Standard Usage | Non-standard usage abusing value |
|---|---|
| <memberList> <member id='jhnam88' name='Jeongho+Nam' birthdate='1988-03-11' /> <member id='master' name='Administartor' birthdate='2011-07-28' /> </memberList> | <member> <id>jhnam88</id> <name>Jeongho+Nam</name> <birthdate>1988-03-11</birthdate> </member> |
Reimplemented from samchon::library::FTInstance.
Reimplemented in samchon::namtree::NTFile.
Definition at line 28 of file FTFile.cpp.
References extension, and samchon::library::FTInstance::toXML().
Referenced by samchon::namtree::NTFile::toXML().


|
protected |
An extension of a file.
FTFile's identifier is composited by name and extension.
Definition at line 31 of file FTFile.hpp.
Referenced by FTFile(), getExtension(), and toXML().