contrib/mul/mmn/mmn_parse_arcs.h
Go to the documentation of this file.
00001 #ifndef mmn_parse_arcs_h_
00002 #define mmn_parse_arcs_h_
00003 //:
00004 // \file
00005 // \brief Parse in a set of arc definitions using names of nodes
00006 // \author Martin Roberts
00007 
00008 #include <vcl_istream.h>
00009 #include <vcl_string.h>
00010 #include <vcl_vector.h>
00011 #include <mmn/mmn_arc.h>
00012 
00013 // Expects "{ arc: { name1 name2 } arc: { name3 name 4 } }"
00014 //Format
00015 // \code
00016 // arcs:
00017 // {
00018 //   arc: { LeftEye RightEye }
00019 //   arc: { Nostrils Mouth }
00020 //   arc: { LeftEyeBrow LeftEye }
00021 //   arc: { RightEyeBrow RightEye }
00022 // }
00023 // \endcode
00024  //Note separating white space is needed after { and before } in arc definitions
00025  //Assumes names in node_names are in order of associated node numbers in
00026  //graph defined by these arcs
00027  //
00028 void  mmn_parse_arcs(vcl_istream& is,
00029                      const vcl_vector<vcl_string>& node_names,
00030                      vcl_vector<mmn_arc>& arcs);
00031 
00032 #endif // mmn_parse_arcs_h_
00033