/
SoundShader.h
55 lines (40 loc) · 1.33 KB
/
SoundShader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include <memory>
#include "isound.h"
#include "ifilesystem.h"
namespace sound
{
/// Representation of a single sound shader.
class SoundShader final :
public ISoundShader
{
// Name of the shader
std::string _name;
// The raw unparsed definition block
decl::DeclarationBlockSyntax _declBlock;
// Information we have parsed on demand
struct ParsedContents;
mutable std::unique_ptr<ParsedContents> _contents;
vfs::FileInfo _fileInfo;
// The modname (ModResource implementation)
std::string _modName;
private:
// Parses the definition block
void parseDefinition() const;
public:
using Ptr = std::shared_ptr<SoundShader>;
SoundShader(const std::string& name);
~SoundShader();
// ISoundShader implementation
SoundRadii getRadii() const override;
const std::string& getDeclName() const override { return _name; }
decl::Type getDeclType() const override { return decl::Type::SoundShader; }
SoundFileList getSoundFileList() const override;
std::string getModName() const override { return _modName; }
const std::string& getDisplayFolder() const override;
std::string getShaderFilePath() const override;
std::string getDefinition() const override;
const decl::DeclarationBlockSyntax& getBlockSyntax() const override;
void setBlockSyntax(const decl::DeclarationBlockSyntax& block) override;
};
}