随笔-167  评论-8  文章-0  trackbacks-0
 1 #include <iostream>
 2 #include <ace/ACE.h>
 3 #include <ace/UUID.h>
 4 #include <ace/Process.h>
 5 using namespace std;
 6 
 7 
 8 int main(int argc, char* argv[])
 9 {
10     string uuid_str;
11 
12     while (1)
13     {
14         ACE_Utils::UUID_Generator uuidout;
15         uuidout.init();
16         ACE_Utils::UUID uuid;
17         //uuidout.generate_UUID(uuid);///->ace5.6.9
           uuidout.generateUUID(uuid);///->ace5.4.0
18         uuid_str.assign(uuid.to_string ()->c_str ());
19         cout<<uuid_str.c_str()<<endl;
20         ACE_OS::sleep( 1 );
21     }
22     
23     return 0;
24 };

posted on 2009-08-21 17:58 老马驿站 阅读(812) 评论(0)  编辑 收藏 引用 所属分类: ACE