लाभ प्रश्न व्यक्तिपरक है, लेकिन इस मामले में यह संक्षिप्त है।
मेरे घर परियोजनाओं में से एक से तुलना करें:
("help,h", "Generate this help message")
("output-file,o", po::value<std::string>(), "Output filename. Required.")
("tangent,t", "Generate/load tangent-space basis.")
("collada-output,c", "Write a Collada file, rather than our mesh XML format.")
("arrays,a", "Write arrays instead of indexed verts. Cannot combine with Collada writing.")
("flip-tangent,f", "Change the tangent-space basis matrix's handedness. Negates bitangent.")
("map", po::value<std::string>(), "Map filename. Defaults to the ColladaConv directory's 'stdmap.txt' file.")
("vao", po::value<std::vector<std::string> >(), "Sequence of mappings, of the form:\n"
"Name # # # #\n"
"\n"
"Each # is an attribute index to use for this VAO.\n"
"Each VAO name must be unique; you cannot use the same VAO in the same place.")
यह करने के लिए:
visible.add_options()("help,h", "Generate this help message")
visible.add_options()("output-file,o", po::value<std::string>(), "Output filename. Required.")
visible.add_options()("tangent,t", "Generate/load tangent-space basis.");
visible.add_options()("collada-output,c", "Write a Collada file, rather than our mesh XML format.");
visible.add_options()("arrays,a", "Write arrays instead of indexed verts. Cannot combine with Collada writing.");
visible.add_options()("flip-tangent,f", "Change the tangent-space basis matrix's handedness. Negates bitangent.");
visible.add_options()("map", po::value<std::string>(), "Map filename. Defaults to the ColladaConv directory's 'stdmap.txt' file.");
visible.add_options()("vao", po::value<std::vector<std::string> >(), "Sequence of mappings, of the form:\n"
"Name # # # #\n"
"\n"
"Each # is an attribute index to use for this VAO.\n"
"Each VAO name must be unique; you cannot use the same VAO in the same place.");
लाइन की लंबाई मायने रखती है। और सब कुछ के सामने visible.add_options()
नहीं होने के कारण इसे पढ़ने में आसान बनाता है।
बूस्ट लेखकों को दिखाना पसंद है ... –
"प्रेतवाधित" एक अच्छा विवरण है ... मैं इसे औपचारिक रूप से प्राप्त करता हूं, लेकिन "अजीब" लगता है ... – thomastiger