Cortenn
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
pbm::GraphSaver Struct Referencefinal

Graph serialization traveler. More...

#include <save.hpp>

Inheritance diagram for pbm::GraphSaver:
Inheritance graph
[legend]
Collaboration diagram for pbm::GraphSaver:
Collaboration graph
[legend]

Public Member Functions

 GraphSaver (DataSaverT saver)
 
void visit (ade::iLeaf *leaf) override
 Implementation of iTraveler. More...
 
void visit (ade::iFunctor *func) override
 Implementation of iTraveler. More...
 
void save (cortenn::Graph &out, PathedMapT labels=PathedMapT())
 Marshal all equation graphs in roots vector to protobuf object. More...
 

Public Attributes

std::list< ade::iLeaf * > leaves_
 List of leaves visited (left to right) More...
 
std::list< ade::iFunctor * > funcs_
 List of functions visited (by depth-first) More...
 
std::unordered_set< ade::iTensor * > visited_
 Visited nodes. More...
 
ade::GraphStat stat
 Internal traveler. More...
 

Private Member Functions

void save_coord (google::protobuf::RepeatedField< double > *coord, const ade::CoordptrT &mapper)
 
void save_data (cortenn::Source &out, ade::iLeaf *in)
 

Private Attributes

DataSaverT saver_
 Data serialization functor. More...
 

Detailed Description

Graph serialization traveler.

Constructor & Destructor Documentation

◆ GraphSaver()

pbm::GraphSaver::GraphSaver ( DataSaverT  saver)
inline

Member Function Documentation

◆ save()

void pbm::GraphSaver::save ( cortenn::Graph &  out,
PathedMapT  labels = PathedMapT() 
)

Marshal all equation graphs in roots vector to protobuf object.

◆ save_coord()

void pbm::GraphSaver::save_coord ( google::protobuf::RepeatedField< double > *  coord,
const ade::CoordptrT &  mapper 
)
private

◆ save_data()

void pbm::GraphSaver::save_data ( cortenn::Source &  out,
ade::iLeaf *  in 
)
inlineprivate

◆ visit() [1/2]

void pbm::GraphSaver::visit ( ade::iLeaf *  leaf)
inlineoverride

Implementation of iTraveler.

◆ visit() [2/2]

void pbm::GraphSaver::visit ( ade::iFunctor *  func)
inlineoverride

Implementation of iTraveler.

Member Data Documentation

◆ funcs_

std::list<ade::iFunctor*> pbm::GraphSaver::funcs_

List of functions visited (by depth-first)

◆ leaves_

std::list<ade::iLeaf*> pbm::GraphSaver::leaves_

List of leaves visited (left to right)

◆ saver_

DataSaverT pbm::GraphSaver::saver_
private

Data serialization functor.

◆ stat

ade::GraphStat pbm::GraphSaver::stat

Internal traveler.

◆ visited_

std::unordered_set<ade::iTensor*> pbm::GraphSaver::visited_

Visited nodes.


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