Paradox Game Engine
v1.0.0 beta06
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Macros
Pages
ObjectMetadata.cs
Go to the documentation of this file.
1
// Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2
// This file is distributed under GPL v3. See LICENSE.md for details.
3
namespace
SiliconStudio.BuildEngine
4
{
5
/// <summary>
6
/// Object metadata created by user in order to inject them in the database
7
/// </summary>
8
public
class
ObjectMetadata
:
IObjectMetadata
9
{
10
/// <inheritdoc/>
11
public
string
ObjectUrl {
get
;
private
set; }
12
13
/// <inheritdoc/>
14
public
MetadataKey
Key {
get
;
private
set; }
15
16
/// <inheritdoc/>
17
public
object
Value {
get
; set; }
18
19
public
ObjectMetadata
(
string
owner,
MetadataKey
key)
20
{
21
ObjectUrl = owner;
22
Key = key;
23
Value = key.GetDefaultValue();
24
}
25
26
public
ObjectMetadata
(
string
owner,
MetadataKey
key,
object
value)
27
{
28
ObjectUrl = owner;
29
Key = key;
30
Value = value;
31
}
32
}
33
34
/// <summary>
35
/// A generic object metadata created by user in order to inject them in the database. It provides a <see cref="GetValue"/> method which return the value casted to the generic type for convenience.
36
/// </summary>
37
public
class
ObjectMetadata
<T> :
ObjectMetadata
38
{
39
/// <inheritdoc/>
40
public
ObjectMetadata
(
string
owner,
MetadataKey
key) : base(owner, key) { }
41
42
/// <inheritdoc/>
43
public
ObjectMetadata
(
string
owner,
MetadataKey
key, T value) : base(owner, key, value) { }
44
45
/// <summary>
46
/// Return the value of the metadata casted to the generic type
47
/// </summary>
48
public
T
GetValue
()
49
{
50
return
(T)Value;
51
}
52
}
53
}
SiliconStudio.BuildEngine.MetadataKey
Represent a metadata key. This object is immutable.
Definition:
MetadataKey.cs:11
SiliconStudio.BuildEngine.ObjectMetadata< T >.ObjectMetadata
ObjectMetadata(string owner, MetadataKey key)
Definition:
ObjectMetadata.cs:40
SiliconStudio.BuildEngine.ObjectMetadata< T >.GetValue
T GetValue()
Return the value of the metadata casted to the generic type
Definition:
ObjectMetadata.cs:48
SiliconStudio.BuildEngine.ObjectMetadata< T >.ObjectMetadata
ObjectMetadata(string owner, MetadataKey key, T value)
Definition:
ObjectMetadata.cs:43
SiliconStudio.BuildEngine.ObjectMetadata.ObjectMetadata
ObjectMetadata(string owner, MetadataKey key)
Definition:
ObjectMetadata.cs:19
SiliconStudio.BuildEngine.ObjectMetadata.ObjectMetadata
ObjectMetadata(string owner, MetadataKey key, object value)
Definition:
ObjectMetadata.cs:26
SiliconStudio.BuildEngine.IObjectMetadata
Interface for object metadata
Definition:
IObjectMetadata.cs:8
SiliconStudio.BuildEngine.ObjectMetadata
Object metadata created by user in order to inject them in the database
Definition:
ObjectMetadata.cs:8
sources
common
buildengine
SiliconStudio.BuildEngine.Common
Metadata
ObjectMetadata.cs
Generated on Sat Dec 20 2014 21:50:58 for Paradox Game Engine by
1.8.7