pgr_alloc.cpp File Reference
#include "cpp_common/pgr_alloc.hpp"
#include <string>
Include dependency graph for pgr_alloc.cpp:

Go to the source code of this file.


char * pgr_msg (const std::string &msg)

Function Documentation

char* pgr_msg ( const std::string &  msg)

Definition at line 29 of file pgr_alloc.cpp.

References pgr_alloc().

Referenced by do_pgr_articulationPoints(), do_pgr_astarManyToMany(), do_pgr_bdAstar(), do_pgr_bdDijkstra(), do_pgr_biconnectedComponents(), do_pgr_bridges(), do_pgr_connectedComponents(), do_pgr_contractGraph(), do_pgr_dijkstraTRSP(), do_pgr_dijkstraVia(), do_pgr_driving_many_to_dist(), do_pgr_edge_disjoint_paths(), do_pgr_eucledianTSP(), do_pgr_lineGraph(), do_pgr_many_to_many_dijkstra(), do_pgr_many_withPointsDD(), do_pgr_max_flow(), do_pgr_maximum_cardinality_matching(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_strongComponents(), do_pgr_tsp(), do_pgr_withPoints(), and pgr_free().

29  {
30  char* duplicate = NULL;
31  duplicate = pgr_alloc(msg.size() + 1, duplicate);
32  memcpy(duplicate, msg.c_str(), msg.size());
33  duplicate[msg.size()] = '\0';
34  return duplicate;
35 }
T * pgr_alloc(std::size_t size, T *ptr)
allocates memory
Definition: pgr_alloc.hpp:68

Here is the call graph for this function:

Here is the caller graph for this function: