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

Annotation of /trunk/gr2lib_cpp/apiversion.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations) (download)
Sat Jul 31 01:44:00 2010 UTC (10 years ago) by william
File size: 1541 byte(s)
commit - header redesign -- actually compiles now.

** Have some issues with loading for granny files, will fix in subsequent commits...

1 william 4 #include "StdAfx.h"
2     #include "apiversion.h"
3     namespace gr2lib
4     {
5     namespace core
6     {
7     namespace apiversion
8     {
9     granny2apiversion::granny2apiversion(void)
10     {
11     ExpectedMajor = GRNProductMajorVersion;
12     ExpectedMinor = GRNProductMinorVersion;
13     ExpectedCustomization = GRNProductCustomization;
14     ExpectedBuild = GRNProductBuildNumber;
15     GrannyGetVersion(&LoadedMajor,&LoadedMinor,&LoadedCustomization,&LoadedBuild);
16     }
17     granny2apiversion::granny2apiversion(granny_int32x Major, granny_int32x Minor, granny_int32x Customization, granny_int32x Build)
18     {
19     ExpectedMajor = Major;
20     ExpectedMinor = Minor;
21     ExpectedCustomization = Customization;
22     ExpectedBuild = Build;
23     GrannyGetVersion(&LoadedMajor,&LoadedMinor,&LoadedCustomization,&LoadedBuild);
24     }
25     granny2apiversion::~granny2apiversion(void)
26     {
27     }
28    
29    
30     string granny2apiversion::ExpectedAPIVersion()
31     {
32     string ret;
33     char buff[256] = {'\0'};
34     sprintf_s(buff, "%i.%i.%i.%i", ExpectedMajor, ExpectedMinor,ExpectedCustomization,ExpectedBuild);
35     ret = &buff[0];
36     return ret;
37     }
38     string granny2apiversion::LoadedAPIVersion()
39     {
40     string ret;
41     char buff[256] = {'\0'};
42     sprintf_s(buff, "%i.%i.%i.%i", LoadedMajor, LoadedMinor,LoadedCustomization,LoadedBuild);
43     ret = &buff[0];
44     return ret;
45     }
46     bool granny2apiversion::APIVersionsMatch()
47     {
48     return GrannyVersionsMatch_(ExpectedMajor,ExpectedMinor,ExpectedCustomization,ExpectedBuild);
49     }
50    
51    
52     }
53     }
54     }

  ViewVC Help
Powered by ViewVC 1.1.22