Easy3D 2.5.3
GraphIO Class Reference

Implementation of file input/output operations for Graph (Currently only PLY format is supported). More...

#include <easy3d/fileio/graph_io.h>

Static Public Member Functions

static Graphload (const std::string &file_name)
 Reads a graph from file file_name. More...
 
static bool save (const std::string &file_name, const Graph *graph)
 Saves graph to file file_name. More...
 

Detailed Description

Implementation of file input/output operations for Graph (Currently only PLY format is supported).

Member Function Documentation

◆ load()

Graph * load ( const std::string &  file_name)
static

Reads a graph from file file_name.

Returns
The pointer of the graph (nullptr if failed).

File extension determines file format (currently only PLY format is supported).

Examples
Tutorial_203_Viewer_wxWidgets, and Tutorial_204_Viewer_Qt.

◆ save()

bool save ( const std::string &  file_name,
const Graph graph 
)
static

Saves graph to file file_name.

File extension determines file format (currently only PLY format is supported).

Returns
The status of the operation
  • true if succeeded
  • false if failed
Examples
Tutorial_203_Viewer_wxWidgets, and Tutorial_204_Viewer_Qt.

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