zoukankan      html  css  js  c++  java
  • NX二次开发-如何在类外面定义一个结构体

     1     #include <uf.h>
     2     #include <uf_obj.h>
     3     #include <uf_part.h>
     4 
     5     
     6     using namespace NXOpen;
     7     using std::string;
     8     using std::exception;
     9     using std::stringstream;
    10     using std::endl;
    11     using std::cout;
    12     using std::cerr;
    13     
    14     
    15     //定义一个结构体记录
    16     struct group
    17     {
    18         CString text;
    19         std::vector<tag_t> boudaries;
    20         std::vector<tag_t> charmfers;
    21         std::vector<tag_t> slots;
    22     };
    23     
    24     struct AllFeats
    25     {
    26         std::vector<tag_t> maxBoudaries;
    27         struct group CurveGroup;
    28     };
    29     
    30     
    31     
    32     //------------------------------------------------------------------------------
    33     // NXOpen c++ test class 
    34     //------------------------------------------------------------------------------
    35     class MyClass
    36     {
    37         // class members
    38     public:
    39         static Session *theSession;
    40         static UI *theUI;
    41 
    42     MyClass();
    43     ~MyClass();
    44 
    45     void do_it();
    46     void print(const NXString &);
    47     void print(const string &);
    48     void print(const char*);
    49 
    50     //定义函数
    51     void MyCurve();
    52 
    53     AllFeats allFeats;
    54 
    55 
    56     private:
    57         Part *workPart, *displayPart;
    58         NXMessageBox *mb;
    59         ListingWindow *lw;
    60         LogFile *lf;
    61     };
  • 相关阅读:
    Java&Go三种HTTP服务端端性能测试
    利用闭包实现自定义等待方法
    LevelDB在测试中应用应用
    利用Java反射处理private变量
    FunTester2021年总结
    推倒重来的觉悟
    SpringMVC项目依赖和静态资源导出
    DES算法详解
    5G AKA协议详解
    RSA算法加解密证明过程
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/10976023.html
Copyright © 2011-2022 走看看