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

Contents of /trunk/gr2lib_cpp/grannyfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (show annotations) (download)
Thu Aug 12 08:37:47 2010 UTC (10 years ago) by william
File size: 1645 byte(s)
Fix all, current, c++ compiler warnings and linker errors

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 granny_log_message_type _type = Type;
12 granny_log_message_origin _origin = Origin;
13 char const* msg = Message;
14 void* data = UserData;
15 }*/
16 grannyfile::grannyfile()
17 {
18 GrannyAPIVersion = new apiversion::granny2apiversion();
19 _logger = new GrannyAPILogger();
20 _GrannyFilename = "";
21 }
22 grannyfile::grannyfile(const char* filename)
23 {
24 GrannyAPIVersion = new apiversion::granny2apiversion();
25 _logger = new GrannyAPILogger();
26 _GrannyFilename = filename;
27 grannyfile::parse_granny_file();
28
29 }
30 grannyfile::grannyfile(const char* filename,granny_int32x ExpectedMajor, granny_int32x ExpectedMinor, granny_int32x ExpectedCustomization, granny_int32x ExpectedBuild)
31 {
32 GrannyAPIVersion = new apiversion::granny2apiversion(ExpectedMajor,ExpectedMinor,ExpectedCustomization,ExpectedBuild);
33 _logger = new GrannyAPILogger();
34 _GrannyFilename = filename;
35 grannyfile::parse_granny_file();
36 }
37 void grannyfile::parse_granny_file()
38 {
39 _logger->SetLogFileName(_GrannyFilename);
40 _grn_file = GrannyReadEntireFile(_GrannyFilename);
41 if (_grn_file != 0)
42 {
43 GrannyFileInfo = GrannyGetFileInfo(_grn_file);
44 }
45 }
46 const char* grannyfile::GrannyFilename()
47 {
48 return _GrannyFilename;
49 }
50 }
51 }

  ViewVC Help
Powered by ViewVC 1.1.22