/[Sims3RigEditor]/trunk/gr2lib_cpp/grannyfile.cpp
ViewVC logotype

Annotation of /trunk/gr2lib_cpp/grannyfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (hide annotations) (download)
Sat Jul 31 01:53:40 2010 UTC (10 years ago) by william
File size: 1284 byte(s)
implement support for logging Granny2 API Messages

1 william 5 #include "StdAfx.h"
2     #include "grannyfile.h"
3    
4     namespace gr2lib
5     {
6     namespace core
7     {
8 william 7 void __cdecl Callback(granny_log_message_type Type, granny_log_message_origin Origin, char const * Message, void * UserData);
9     void __cdecl Callback(granny_log_message_type Type, granny_log_message_origin Origin, char const * Message, void * UserData)
10 william 6 {
11     assert(Message);
12     }
13 william 5 grannyfile::grannyfile(const char* filename)
14     {
15     GrannyAPIVersion = new apiversion::granny2apiversion();
16 william 8 _GrannyFilename = filename;
17 william 5 grannyfile::parse_granny_file();
18    
19     }
20     grannyfile::grannyfile(const char* filename,granny_int32x ExpectedMajor, granny_int32x ExpectedMinor, granny_int32x ExpectedCustomization, granny_int32x ExpectedBuild)
21     {
22     GrannyAPIVersion = new apiversion::granny2apiversion(ExpectedMajor,ExpectedMinor,ExpectedCustomization,ExpectedBuild);
23     _GrannyFilename = filename;
24     grannyfile::parse_granny_file();
25     }
26     void grannyfile::parse_granny_file()
27 william 7 {
28    
29 william 9 _logger = new GrannyAPILogger();
30 william 6
31 william 5 _grn_file = GrannyReadEntireFile(_GrannyFilename);
32     if (_grn_file != 0)
33     {
34     GrannyFileInfo = GrannyGetFileInfo(_grn_file);
35     }
36    
37    
38    
39     }
40     const char* grannyfile::GrannyFilename()
41     {
42     return _GrannyFilename;
43     }
44     }
45     }

  ViewVC Help
Powered by ViewVC 1.1.22