Torque3D Documentation / _generateds / assetDefinition.h

assetDefinition.h

Engine/source/assets/assetDefinition.h

More...

Classes:

Detailed Description

  1
  2//-----------------------------------------------------------------------------
  3// Copyright (c) 2013 GarageGames, LLC
  4//
  5// Permission is hereby granted, free of charge, to any person obtaining a copy
  6// of this software and associated documentation files (the "Software"), to
  7// deal in the Software without restriction, including without limitation the
  8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9// sell copies of the Software, and to permit persons to whom the Software is
 10// furnished to do so, subject to the following conditions:
 11//
 12// The above copyright notice and this permission notice shall be included in
 13// all copies or substantial portions of the Software.
 14//
 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 21// IN THE SOFTWARE.
 22//-----------------------------------------------------------------------------
 23
 24#ifndef _ASSET_DEFINITION_H_
 25#define _ASSET_DEFINITION_H_
 26
 27#ifndef _STRINGTABLE_H_
 28#include "core/stringTable.h"
 29#endif
 30
 31#ifndef _STRINGUNIT_H_
 32#include "core/strings/stringUnit.h"
 33#endif
 34
 35#ifndef _SIM_H_
 36#include "console/sim.h"
 37#endif
 38
 39#ifndef _SIMOBJECT_H_
 40#include "console/simObject.h"
 41#endif
 42
 43#ifndef _CONSOLEOBJECT_H_
 44#include "console/consoleObject.h"
 45#endif
 46
 47//-----------------------------------------------------------------------------
 48
 49class AssetBase;
 50class ModuleDefinition;
 51
 52//-----------------------------------------------------------------------------
 53
 54struct AssetDefinition
 55{
 56public:
 57    AssetDefinition() { reset(); }
 58    virtual ~AssetDefinition() {}
 59
 60    virtual void reset( void )
 61    {
 62        mAssetLoading = false;
 63        mpModuleDefinition = NULL;
 64        mpAssetBase = NULL;
 65        mAssetBaseFilePath = StringTable->EmptyString();
 66        mAssetId = StringTable->EmptyString();
 67        mAssetLoadedCount = 0;
 68        mAssetUnloadedCount = 0;
 69        mAssetRefreshEnable = true;
 70        mAssetLooseFiles.clear();
 71
 72        // Reset persisted state.
 73        mAssetName = StringTable->EmptyString();
 74        mAssetDescription = StringTable->EmptyString();
 75        mAssetAutoUnload = true;
 76        mAssetInternal = false;
 77        mAssetPrivate = false;
 78        mAssetType = StringTable->EmptyString();
 79        mAssetCategory = StringTable->EmptyString();
 80    }
 81
 82    ModuleDefinition*           mpModuleDefinition;
 83    AssetBase*                  mpAssetBase;
 84    StringTableEntry            mAssetBaseFilePath;
 85    StringTableEntry            mAssetId;
 86    U32                         mAssetLoadedCount;
 87    U32                         mAssetUnloadedCount;
 88    bool                        mAssetRefreshEnable;
 89    Vector<StringTableEntry>    mAssetLooseFiles;
 90
 91    /// Persisted state.
 92    StringTableEntry            mAssetName;
 93    StringTableEntry            mAssetDescription;
 94    bool                        mAssetAutoUnload;
 95    bool                        mAssetInternal; 
 96    bool                        mAssetPrivate;
 97    bool                        mAssetLoading;
 98    StringTableEntry            mAssetType;
 99    StringTableEntry            mAssetCategory;
100};
101
102#endif // _ASSET_DEFINITION_H_
103
104