A very strange code

Today, when I was going through a code for video coding, I found a very strange code as given below:Please see the strange code in the following URL. ( it is too big to be pasted here)

URL is http://hevc.hhi.fraunhofer.de/HM-doc/_t_app_enc_cfg_8cpp_source.html

code Line 102

A set of parameters ( file I/O parameters) are enclosed in simple braces and are simply written line by line . What is the format ? I didn't get any idea.

Bool TAppEncCfg::parseCfg( Int argc, Char* argv[] )
{
bool do_help = false;

string cfg_InputFile;
string cfg_dQPFile;
po::Options opts;
opts.addOptions()

("help", do_help, false, "this help text")
("c", po::parseConfigFile, "configuration file name")

/* File, I/O and source parameters */

("InputFile,i", cfg_InputFile, string(""), "original YUV input file name")
("BitstreamFile,b", cfg_BitstreamFile, string(""), "bitstream output file name")
("ReconFile,o", cfg_ReconFile, string(""), "reconstructed YUV output file name")

("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width")
.....
.......

/* Unit definition parameters */
("MaxCUWidth", m_uiMaxCUWidth, 64u)
("MaxCUHeight", m_uiMaxCUHeight, 64u)

......
.....
return true;
}

Last edited on
Sorry, I don't understand your question.
You could make that by doing
1
2
3
4
5
6
7
class Add_Options{ //what Options::addOptions() returns
public:
   Add_Options& operator()( /* args */ ){
      //...
      return *this; //so we can add more things
   }
};
For the look is: access, variable referenced, default value, description.

Kind of similar to http://www.parashift.com/c++-faq/named-parameter-idiom.html
Hello ne555,
Thanks for replying. Will you please go through the URL given above.(code is too big to be pasted here)
it says 404 not found
URL is working now
I went the first time, it's like adding elements to a container
¿what is your question?
Topic archived. No new replies allowed.