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

Contents of /trunk/gr2lib_cpp/grannyfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (show 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 #include "StdAfx.h"
2 #include "grannyfile.h"
3
4 namespace gr2lib
5 {
6 namespace core
7 {
8 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 {
11 assert(Message);
12 }
13 grannyfile::grannyfile(const char* filename)
14 {
15 GrannyAPIVersion = new apiversion::granny2apiversion();
16 _GrannyFilename = filename;
17 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 {
28
29 _logger = new GrannyAPILogger();
30
31 _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