本文整理汇总了C++中ON_String::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_String::IsEmpty方法的具体用法?C++ ON_String::IsEmpty怎么用?C++ ON_String::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_String
的用法示例。
在下文中一共展示了ON_String::IsEmpty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, const char *argv[])
{
// If you are using OpenNURBS as a Windows DLL, then you MUST use
// ON::OpenFile() to open the file. If you are not using OpenNURBS
// as a Windows DLL, then you may use either ON::OpenFile() or fopen()
// to open the file.
int argi;
if (argc < 2)
{
Usage(argv[0]);
return 0;
}
// Call once in your application to initialze opennurbs library
ON::Begin();
int version = 0; // write current Rhino file
// default dump is to stdout
ON_TextLog dump_to_stdout;
ON_TextLog* dump = &dump_to_stdout;
ON_String input;
ON_String output;
ON_String logfile;
for (argi = 1; argi < argc; argi++)
{
ON_String arg(argv[argi]);
if (arg.Left(10).CompareOrdinal("--version=", true) == 0)
{
arg = arg.Mid(10);
version = atoi(arg);
continue;
}
if (arg.Left(2).CompareOrdinal("/v", true) == 0 || arg.Left(2).CompareOrdinal("-v", true) == 0)
{
argi++;
const char* sversion = argv[argi];
version = atoi(sversion);
continue;
}
if (arg.Left(6).CompareOrdinal("--log=", true) == 0)
{
arg = arg.Mid(6);
logfile = arg;
continue;
}
if (input.IsEmpty())
{
input = arg;
if (false == ON_FileStream::Is3dmFile(input, true))
{
input = ON_String::EmptyString;
break;
}
continue;
}
if (output.IsEmpty())
{
output = arg;
continue;
}
// Invalid command line parameter
input = ON_String::EmptyString;
output = ON_String::EmptyString;
break;
}
if (input.IsEmpty() || output.IsEmpty())
{
Usage(argv[0]);
return 1;
}
dump->Print("\nOpenNURBS Archive File: %s\n", static_cast<const char*>(input) );
// open file containing opennurbs archive
FILE* archive_fp = ON_FileStream::Open3dmToRead(input);
if (nullptr == archive_fp)
{
dump->Print(" Unable to open file.\n");
return 1;
}
dump->PushIndent();
// create achive object from file pointer
ON_BinaryFile archive(ON::archive_mode::read3dm, archive_fp);
// read the contents of the file into "model"
ONX_Model model;
//.........这里部分代码省略.........