0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
clanguml::common::generators::graphml Namespace Reference

Classes

class  generator
 Base class for diagram generators. More...
 
class  graphml_node_map_t
 
class  property_keymap_t
 

Typedefs

using graphml_t = pugi::xml_document
 
using graphml_node_t = pugi::xml_node
 
using key_property_map_t = std::map< std::string, std::pair< std::string, property_type > >
 

Enumerations

enum class  xml_node_t { kGraph , kNode , kEdge }
 
enum class  property_type {
  kBoolean , kInt , kLong , kFloat ,
  kDouble , kString
}
 

Functions

std::string to_string (const property_type t)
 
template<typename DiagramModel , typename DiagramConfig >
std::ostream & operator<< (std::ostream &os, const generator< DiagramModel, DiagramConfig > &g)
 

Typedef Documentation

◆ graphml_node_t

Definition at line 47 of file generator.h.

◆ graphml_t

using clanguml::common::generators::graphml::graphml_t = typedef pugi::xml_document

Definition at line 46 of file generator.h.

◆ key_property_map_t

using clanguml::common::generators::graphml::key_property_map_t = typedef std::map< std::string, std::pair< std::string, property_type> >

Definition at line 62 of file generator.h.

Enumeration Type Documentation

◆ property_type

Types of data node attributes that can be added to GraphML nodes (xs:NMTOKEN)

Enumerator
kBoolean 
kInt 
kLong 
kFloat 
kDouble 
kString 

Definition at line 58 of file generator.h.

◆ xml_node_t

The types of graph nodes in the GraphML XML document

Enumerator
kGraph 
kNode 
kEdge 

Definition at line 52 of file generator.h.

52{ kGraph, kNode, kEdge };

Function Documentation

◆ operator<<()

template<typename DiagramModel , typename DiagramConfig >
std::ostream & clanguml::common::generators::graphml::operator<< ( std::ostream &  os,
const generator< DiagramModel, DiagramConfig > &  g 
)

Definition at line 297 of file generator.h.

299{
300 g.generate(os);
301 return os;
302}

◆ to_string()

std::string clanguml::common::generators::graphml::to_string ( const property_type  t)

Definition at line 23 of file generator.cc.

24{
25 switch (t) {
26 case property_type::kBoolean:
27 return "boolean";
28 case property_type::kInt:
29 return "int";
30 case property_type::kLong:
31 return "long";
32 case property_type::kFloat:
33 return "float";
34 case property_type::kDouble:
35 return "double";
36 case property_type::kString:
37 return "string";
38 default:
39 assert(false);
40 return "";
41 }
42}