Space Engineers
Public Member Functions | Protected Attributes | Properties | List of all members
VRage.Game.Components.MyModStorageComponentBase Class Referenceabstract
Inheritance diagram for VRage.Game.Components.MyModStorageComponentBase:
VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase Sandbox.Game.EntityComponents.MyModStorageComponent

Public Member Functions

abstract string GetValue (Guid guid)
 Gets a value from the Storage dictionary with the specified key. More...
 
abstract bool TryGetValue (Guid guid, out string value)
 Trys to a value from the Storage dictionary with the specified key. More...
 
abstract void SetValue (Guid guid, string value)
 Stores a value with the specified key into the Storage dictionary. More...
 
abstract bool RemoveValue (Guid guid)
 Removes a value with the specified key from the Storage dictionary. More...
 
override MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
void Add (KeyValuePair< Guid, string > item)
 
void Add (Guid key, string value)
 
void Clear ()
 
bool Contains (KeyValuePair< Guid, string > item)
 
bool ContainsKey (Guid key)
 
void CopyTo (KeyValuePair< Guid, string >[] array, int arrayIndex)
 
IEnumerator< KeyValuePair< Guid, string > > GetEnumerator ()
 
bool Remove (KeyValuePair< Guid, string > item)
 
bool Remove (Guid key)
 
- Public Member Functions inherited from VRage.Game.Components.MyEntityComponentBase
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
- Public Member Functions inherited from VRage.Game.Components.MyComponentBase
virtual void SetContainer (MyComponentContainer container)
 Sets the container of this component. Note that the component is not added to the container here! Therefore, use MyComponentContainer.Add(...) method and it will in turn call this method. Actually, you should seldom have the need to call this method yourself. More...
 
virtual T GetAs< T > ()
 
virtual void OnAddedToScene ()
 CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already! More...
 
virtual void OnRemovedFromScene ()
 CH: TOOD: Be careful! This does not get called if the component is removed from a container that is still in the scene! More...
 
virtual void Deserialize (MyObjectBuilder_ComponentBase builder)
 
virtual void Init (MyComponentDefinitionBase definition)
 
virtual bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 

Protected Attributes

IDictionary< Guid, string > m_storageData = new Dictionary<Guid, string>()
 

Properties

override string ComponentTypeDebugString [get]
 
string this[Guid key] [get, set]
 
int Count [get]
 
bool IsReadOnly [get]
 
ICollection< Guid > Keys [get]
 
ICollection< string > Values [get]
 
- Properties inherited from VRage.Game.Components.MyEntityComponentBase
MyEntityComponentContainer Container [get]
 
IMyEntity Entity [get]
 
abstract string ComponentTypeDebugString [get]
 Name of the base component type for debug purposes (e.g.: "Position") More...
 
- Properties inherited from VRage.Game.Components.MyComponentBase
MyComponentContainer ContainerBase [get]
 This cannot be named Container to not conflict with the definition of Container in MyEntityComponentBase. More...
 

Additional Inherited Members

- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Definition at line 9 of file MyModStorageComponentBase.cs.

Member Function Documentation

void VRage.Game.Components.MyModStorageComponentBase.Add ( KeyValuePair< Guid, string >  item)
inline

Definition at line 103 of file MyModStorageComponentBase.cs.

void VRage.Game.Components.MyModStorageComponentBase.Add ( Guid  key,
string  value 
)
inline

Definition at line 108 of file MyModStorageComponentBase.cs.

void VRage.Game.Components.MyModStorageComponentBase.Clear ( )
inline

Definition at line 113 of file MyModStorageComponentBase.cs.

bool VRage.Game.Components.MyModStorageComponentBase.Contains ( KeyValuePair< Guid, string >  item)
inline

Definition at line 118 of file MyModStorageComponentBase.cs.

bool VRage.Game.Components.MyModStorageComponentBase.ContainsKey ( Guid  key)
inline

Definition at line 123 of file MyModStorageComponentBase.cs.

void VRage.Game.Components.MyModStorageComponentBase.CopyTo ( KeyValuePair< Guid, string >[]  array,
int  arrayIndex 
)
inline

Definition at line 128 of file MyModStorageComponentBase.cs.

IEnumerator<KeyValuePair<Guid, string> > VRage.Game.Components.MyModStorageComponentBase.GetEnumerator ( )
inline

Definition at line 133 of file MyModStorageComponentBase.cs.

abstract string VRage.Game.Components.MyModStorageComponentBase.GetValue ( Guid  guid)
pure virtual

Gets a value from the Storage dictionary with the specified key.

Template Parameters
T
Parameters
guid
Returns

This can throw exceptions

Implemented in Sandbox.Game.EntityComponents.MyModStorageComponent.

bool VRage.Game.Components.MyModStorageComponentBase.Remove ( KeyValuePair< Guid, string >  item)
inline

Definition at line 138 of file MyModStorageComponentBase.cs.

bool VRage.Game.Components.MyModStorageComponentBase.Remove ( Guid  key)
inline

Definition at line 143 of file MyModStorageComponentBase.cs.

abstract bool VRage.Game.Components.MyModStorageComponentBase.RemoveValue ( Guid  guid)
pure virtual

Removes a value with the specified key from the Storage dictionary.

Parameters
guid

Implemented in Sandbox.Game.EntityComponents.MyModStorageComponent.

override MyObjectBuilder_ComponentBase VRage.Game.Components.MyModStorageComponentBase.Serialize ( bool  copy = false)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 50 of file MyModStorageComponentBase.cs.

abstract void VRage.Game.Components.MyModStorageComponentBase.SetValue ( Guid  guid,
string  value 
)
pure virtual

Stores a value with the specified key into the Storage dictionary.

Template Parameters
T
Parameters
guid
value

Implemented in Sandbox.Game.EntityComponents.MyModStorageComponent.

abstract bool VRage.Game.Components.MyModStorageComponentBase.TryGetValue ( Guid  guid,
out string  value 
)
pure virtual

Trys to a value from the Storage dictionary with the specified key.

Template Parameters
T
Parameters
guid
value
Returns
true on success; false on failure

Implemented in Sandbox.Game.EntityComponents.MyModStorageComponent.

Member Data Documentation

IDictionary<Guid, string> VRage.Game.Components.MyModStorageComponentBase.m_storageData = new Dictionary<Guid, string>()
protected

Definition at line 11 of file MyModStorageComponentBase.cs.

Property Documentation

override string VRage.Game.Components.MyModStorageComponentBase.ComponentTypeDebugString
get

Definition at line 14 of file MyModStorageComponentBase.cs.

int VRage.Game.Components.MyModStorageComponentBase.Count
get

Definition at line 72 of file MyModStorageComponentBase.cs.

bool VRage.Game.Components.MyModStorageComponentBase.IsReadOnly
get

Definition at line 80 of file MyModStorageComponentBase.cs.

ICollection<Guid> VRage.Game.Components.MyModStorageComponentBase.Keys
get

Definition at line 88 of file MyModStorageComponentBase.cs.

string VRage.Game.Components.MyModStorageComponentBase.this[Guid key]
getset

Definition at line 59 of file MyModStorageComponentBase.cs.

ICollection<string> VRage.Game.Components.MyModStorageComponentBase.Values
get

Definition at line 96 of file MyModStorageComponentBase.cs.


The documentation for this class was generated from the following file: