FBX SDK Reference Guide: kfbxproductinfo.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _KFbxProductInfo_h
00005 #define _KFbxProductInfo_h
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2008 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <kaydaradef.h>
00043 #ifndef KFBX_DLL 
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kaydara.h>
00048 
00049 #include <klib/karrayul.h>
00050 #include <klib/kstring.h>
00051 #include <klib/kstringlist.h>
00052 
00053 #include <kfbxplugins/kfbxutilities.h>
00054 
00055 #ifndef MB_FBXSDK
00056 #include <kbaselib_nsuse.h>
00057 #endif
00058 
00059 #include <kbaselib_forward.h>
00060 
00061 #include <fbxfilesdk_nsbegin.h>
00062 
00063 #define PRODUCTINFO_FBXINFO_STRUCTURE           "fbxinfo"
00064 #define PRODUCTINFO_OS_STRUCTURE                "os"
00065 #define PRODUCTINFO_OS_NAME_PROPERTY            "name"
00066 #define PRODUCTINFO_FBXSDK_STRUCTURE            "fbxsdk"
00067 #define PRODUCTINFO_FBXPLUGIN_STRUCTURE         "fbxplugin"
00068 #define PRODUCTINFO_FBXPLUGIN_NAME_PROPERTY     "name"
00069 #define PRODUCTINFO_FBXPLUGIN_SHOW_PROPERTY     "show"
00070 #define PRODUCTINFO_PACKAGE_NAME_STRUCTURE      "package_name"
00071 #define PRODUCTINFO_PACKAGE_VERSION_STRUCTURE   "package_version"
00072 #define PRODUCTINFO_VERSION_NUMBER_STRUCTURE    "version_number"
00073 #define PRODUCTINFO_BUILD_NUMBER_STRUCTURE      "build_number"
00074 #define PRODUCTINFO_URL_STRUCTURE               "url"
00075 #define PRODUCTINFO_MESSAGE_STRUCTURE           "message"
00076 #define PRODUCTINFO_MESSAGE_LANG_PROPERTY       "lang"
00077 
00081 class KFBX_DLL KFbxProductInfo
00082 {
00083 public:
00088 
00099     KFbxProductInfo(KString pProduct, KString pPackageVersion, KString pOS, KString pVersion,
00100                     KString pBuildNumber, KString pURL, KString pLang = "", KString pMessage = "");
00101 
00112     KFbxProductInfo(KString pProduct, KString pPackageVersion, KString pOS, KString pVersion,
00113                     KString pBuildNumber, KString pURL, KStringList *pMessageList = NULL, bool pShow = true);
00114 
00116     virtual ~KFbxProductInfo ();
00118 
00123 
00127     KString     GetProduct()        { return mProduct; }
00128 
00132     bool        Show()              { return mShow; }
00133 
00137     KString     GetPackageVersion() { return mPackageVersion; }
00138 
00142     KString     GetOS()             { return mOS; }
00143 
00147     KString     GetVersion()        { return mVersion; }
00148 
00152     KString     GetBuildNumber()    { return mBuildNumber; }
00153 
00157     KString     GetURL()            { return mURL; }
00158 
00162     int         GetLangCount()      { return mMessageList->GetCount(); }
00163 
00168     KString     GetLang(int i)      { return mMessageList->GetStringAt(i); }
00169 
00174     KString     GetMessageStr(int i){ return *(KString*)mMessageList->GetReferenceAt(i); }
00176 private:
00177     KString     mProduct;
00178     bool        mShow;
00179     KString     mPackageVersion;
00180     KString     mOS;
00181     KString     mVersion;
00182     KString     mBuildNumber;
00183     KString     mURL;
00184     KStringList *mMessageList;
00185 
00186 };
00187 
00188 
00189 class KFbxProductInfo;
00190 typedef class KFBX_DLL KArrayTemplate<KFbxProductInfo *> KFbxArrayProductInfo;
00191 
00195 class KFBX_DLL KFbxProductInfoBuilder
00196 {
00197 public:
00198     
00203 
00205     KFbxProductInfoBuilder();
00206 
00208     virtual ~KFbxProductInfoBuilder ();
00209 
00211 
00225     bool FillArray(
00226             KString pUrl,
00227             KFbxArrayProductInfo &pArrayProductInfo,
00228             KFbxProductInfo *pRefProductInfo,
00229             int (*pFCompareProducts)(const void*, const void*),
00230             int (*pFCompareVersions)(const void*, const void*)
00231     );
00232 
00233 private:
00234     // Array of all KFbxProductInfo found in mXmlDoc
00235     KFbxArrayProductInfo    mArrayProductInfo;
00236 };
00237 
00238 #include <fbxfilesdk_nsend.h>
00239 
00240 #endif // #ifndef _KFbxProductInfo
00241 
00242