Samchon Framework for CPP
1.0.0
|
A folder. More...
#include <FTFolder.hpp>
Public Member Functions | |
FTFolder (FTFactory *, FTFolder *) | |
Construct from factory and parent folder. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the Entity. More... | |
![]() | |
EntityGroup () | |
Default Constructor. More... | |
virtual void | construct (std::shared_ptr< library::XML > xml) |
Construct data of the Entity from an XML object. More... | |
auto | has (const std::string &key) const -> bool |
Indicates whether a container has an object having the specified identifier. More... | |
auto | get (const std::string &key) -> value_type & |
Access the element by specified identifier(key). More... | |
auto | get (const std::string &key) const -> const value_type & |
Access the const element by specified identifier(key). More... | |
![]() | |
Entity () | |
Default Constructor. More... | |
![]() | |
IEntityGroup () | |
Default Constructor. More... | |
![]() | |
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... | |
Protected Member Functions | |
virtual auto | CHILD_TAG () const -> std::string override |
A tag name of children. More... | |
![]() | |
virtual auto | createChild (std::shared_ptr< library::XML >) -> entity_type *=0 |
Factory method of a child Entity. More... | |
![]() | |
virtual auto | TAG () const -> std::string |
A tag name when represented by XML. More... | |
Protected Attributes | |
FTFactory * | factory |
Factory instance for creating sub files. More... | |
![]() | |
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... | |
A folder.
A folder object has recursive and hierarchical relationship.
Definition at line 23 of file FTFolder.hpp.
Construct from factory and parent folder.
factory | Factory instance |
parent | Parent folder that this folder is belonged to |
Definition at line 15 of file FTFolder.cpp.
References samchon::protocol::EntityGroup< _Container, _ETy, T >::construct(), samchon::library::FTFactory::createFile(), factory, and samchon::library::FTFactory::registerInstance().
|
overrideprotectedvirtual |
A tag name of children.
< TAG>
<CHILD_TAG />
<CHILD_TAG />
</TAG>
Implements samchon::protocol::IEntityGroup.
Definition at line 13 of file FTFolder.cpp.
|
overridevirtual |
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.
Definition at line 39 of file FTFolder.cpp.
References samchon::library::FTInstance::toXML(), and samchon::protocol::EntityGroup< _Container, _ETy, T >::toXML().
|
protected |
Factory instance for creating sub files.
Definition at line 36 of file FTFolder.hpp.
Referenced by FTFolder().