Samchon Framework for CPP  1.0.0
samchon::namtree::NTSide Class Reference

A side of a conditional expresson. More...

#include <NTSide.hpp>

Collaboration diagram for samchon::namtree::NTSide:

Public Member Functions

virtual void construct (std::shared_ptr< library::XML >) override
 Construct data of the Entity from an XML object. More...
 
virtual auto toXML () const -> std::shared_ptr< library::XML > override
 Get an XML object represents the Entity. More...
 
- Public Member Functions inherited from samchon::protocol::Entity
 Entity ()
 Default Constructor. More...
 
virtual auto key () const -> std::string
 Get a key that can identify the Entity uniquely. More...
 

Protected Member Functions

virtual auto TAG () const -> std::string override
 A tag name when represented by XML. More...
 

Detailed Description

A side of a conditional expresson.

namtree_nt_side.png

Two NTSide classes are belonged to a NTCriteria as left and right side. The NTSide class has a NTFile representing a function and parameters to adjust to the function.

namtree_criteria.png
See also
samchon::namtree
Author
Jeongho Nam http://samchon.org

Definition at line 32 of file NTSide.hpp.

Member Function Documentation

auto NTSide::TAG ( ) const -> std::string
overrideprotectedvirtual

A tag name when represented by XML.

Returns
A tag name

Implements samchon::protocol::Entity.

Definition at line 17 of file NTSide.cpp.

void NTSide::construct ( std::shared_ptr< library::XML )
overridevirtual

Construct data of the Entity from an XML object.

Overrides the construct() method and fetch data of member variables from the XML.

By recommended guidance, data representing member variables are contained in properties of the put XML object.

Parameters
xmlAn xml used to construct data of entity

Implements samchon::protocol::Entity.

Definition at line 25 of file NTSide.cpp.

auto NTSide::toXML ( ) const -> std::shared_ptr<library::XML>
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>
Returns
An XML object representing the Entity.

Reimplemented from samchon::protocol::Entity.

Definition at line 56 of file NTSide.cpp.


The documentation for this class was generated from the following files: