| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #pragma once
- #include <Atomic/Core/Object.h>
- #include "AssetImporter.h"
- using namespace Atomic;
- namespace ToolCore
- {
- class Asset : public Object
- {
- OBJECT(Asset);
- public:
- /// Construct.
- Asset(Context* context, const String& guid, unsigned timestamp);
- virtual ~Asset();
- bool Import();
- const String& GetGUID() const { return guid_; }
- const String& GetImporterName() { return importer_.Null() ? String::EMPTY : importer_->GetTypeName(); }
- const String& GetName() { return name_; }
- const String& GetPath() const { return path_; }
- bool SetPath(const String& path);
- void SetDirty(bool dirty) { dirty_ = dirty; }
- bool IsDirty() const { return dirty_; }
- bool IsFolder() const { return isFolder_; }
- private:
- String guid_;
- String path_;
- String name_;
- bool dirty_;
- bool isFolder_;
- SharedPtr<AssetImporter> importer_;
- };
- }
|