drv_args.cpp
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 1,459 行 · 第 1/4 页
CPP
1,459 行
i++;
}
else if (av[i][2] == 'T')
{
idl_global->append_idl_flag (av[i + 1]);
be_global->server_template_skeleton_ending (av[i + 1]);
i++;
}
else if (av[i][2] == 'i')
{
idl_global->append_idl_flag (av[i + 1]);
be_global->server_inline_ending (av[i + 1]);
i++;
}
else if (av[i][2] == 't')
{
idl_global->append_idl_flag (av[i + 1]);
be_global->server_template_inline_ending (av[i + 1]);
i++;
}
else if (av[i][2] == 'I')
{
idl_global->append_idl_flag (av[i + 1]);
be_global->implementation_skel_ending (av[i + 1]);
i++;
}
else
{
// I expect 's' or 'T' or 'i' or 't' after 's'.
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
break;
// Operation lookup strategy.
// <perfect_hash>, <dynamic_hash> or <binary_search>
// Default is perfect.
case 'H':
idl_global->append_idl_flag (av[i + 1]);
if (av[i+1] == 0 || av[i+1][0] == '-')
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("no selection for -H option\n")));
ACE_OS::exit (99);
}
else if (ACE_OS::strcmp (av[i+1], "dynamic_hash") == 0)
{
be_global->lookup_strategy (
BE_GlobalData::TAO_DYNAMIC_HASH
);
}
else if (ACE_OS::strcmp (av[i + 1], "perfect_hash") == 0)
{
be_global->lookup_strategy (
BE_GlobalData::TAO_PERFECT_HASH
);
}
else if (ACE_OS::strcmp (av[i + 1], "binary_search") == 0)
{
be_global->lookup_strategy (
BE_GlobalData::TAO_BINARY_SEARCH
);
}
else if (ACE_OS::strcmp (av[i + 1], "linear_search") == 0)
{
be_global->lookup_strategy (
BE_GlobalData::TAO_LINEAR_SEARCH
);
}
else
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("%s: unknown operation lookup <%s>\n"),
av[0],
av[i + 1]));
ACE_OS::exit (99);
}
i++;
break;
// Switching between ""s and <>s when we generate
// #include statements for the standard files (e.g. tao/corba.h)
case 'i':
if (av[i][2] == 'c')
{
be_global->changing_standard_include_files (1);
}
else if (av[i][2] == 'n')
{
be_global->changing_standard_include_files (0);
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
break;
// Path for the perfect hash generator(gperf) program. Default
// is $ACE_ROOT/bin/gperf.
case 'g':
if (av[i][2] == '\0')
{
idl_global->append_idl_flag (av[i + 1]);
idl_global->gperf_path (av[i + 1]);
i++;
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
break;
// Option to generate the features regarding the
// Messaging Specification.
// Directory where all the IDL-Compiler-Generated files are to
// be kept. Default is the current directory from which the
// <tao_idl> is called.
case 'o':
if (av[i][2] == '\0')
{
idl_global->append_idl_flag (av[i + 1]);
be_global->output_dir (av [i + 1]);
i++;
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
break;
// Temp directory for the IDL compiler to keep its files.
case 't':
if (av[i][2] == '\0')
{
idl_global->append_idl_flag (av[i + 1]);
idl_global->temp_dir (av [i + 1]);
i++;
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
break;
case 'D':
case 'U':
case 'I':
if (av[i][2] == '\0')
{
if (i < ac - 1)
{
idl_global->append_idl_flag (av[i + 1]);
ACE_NEW (buffer,
char[ACE_OS::strlen (av[i])
+ ACE_OS::strlen (av[i + 1])
+ 2]);
ACE_OS::sprintf (buffer,
"%s%s",
av[i],
av[i + 1]);
DRV_cpp_putarg (buffer);
idl_global->add_include_path (buffer + 2);
i++;
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
}
else
{
idl_global->add_include_path (av[i] + 2);
DRV_cpp_putarg (av[i]);
}
break;
case 'E':
idl_global->set_compile_flags (idl_global->compile_flags () |
IDL_CF_ONLY_PREPROC);
break;
case 'V':
idl_global->set_compile_flags (idl_global->compile_flags () |
IDL_CF_VERSION);
break;
case 'W':
if (av[i][2] == '\0')
{
if (i < ac - 1)
{
i++;
s = av[i];
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
}
else
{
s = av[i] + 2;
}
switch (*s)
{
default:
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: -W must be followed by 'p' or 'b'\n")
));
ACE_OS::exit (99);
case 'p':
if (*(s + 1) == ',')
{
DRV_prep_cpp_arg (s + 2);
}
break;
case 'b':
if (*(s + 1) == ',')
{
DRV_prep_be_arg (s + 2, I_TRUE);
}
break;
}
break;
case 'Y':
if (av[i][2] == '\0')
{
if (i < ac - 1)
{
i++;
s = av[i];
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
}
else
{
s = av[i] + 2;
}
switch (*s)
{
case 'p':
if (*(s + 1) == ',')
{
idl_global->set_cpp_location (s + 2);
DRV_cpp_new_location (s + 2);
}
break;
default:
break;
}
break;
case 'b':
if (av[i][2] == '\0')
{
if (i < ac - 1)
{
i++;
s = av[i];
}
else
{
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("IDL: I don't understand")
ACE_TEXT (" the '%s' option\n"),
av[i]
));
ACE_OS::exit (99);
}
}
else
{
s = av[i] + 2;
}
idl_global->set_be (s);
break;
case 'd':
idl_global->set_compile_flags (idl_global->compile_flags ()
| IDL_CF_DUMP_AST);
break;
case 'u':
idl_global->set_compile_flags (idl_global->compile_flags ()
| IDL_CF_ONLY_USAGE);
break;
case 'v':
idl_global->set_compile_flags (idl_global->compile_flags ()
| IDL_CF_INFORMATIVE);
break;
case 'w':
idl_global->set_compile_flags (idl_global->compile_flags ()
| IDL_CF_NOWARNINGS);
break;
case 'S':
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?