M&B: Bannerlord 1.2.7
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.ObjectSystem.MBObjectManager Class Reference

Public Member Functions

void Destroy ()
 
void RegisterType< T > (string classPrefix, string classListPrefix, uint typeId, bool autoCreateInstance=true, bool isTemporary=false)
 
bool HasType (Type type)
 
string FindRegisteredClassPrefix (Type type)
 
Type FindRegisteredType (string classPrefix)
 
RegisterObject< T > (T obj)
 
RegisterPresumedObject< T > (T obj)
 
void UnregisterObject (MBObjectBase obj)
 
GetObject< T > (Func< T, bool > predicate)
 
GetObject< T > (string objectName)
 
GetFirstObject< T > ()
 
bool ContainsObject< T > (string objectName)
 
void RemoveTemporaryTypes ()
 
void PreAfterLoad ()
 
void AfterLoad ()
 
MBObjectBase GetObject (MBGUID objectId)
 
MBObjectBase GetObject (string typeName, string objectName)
 
MBReadOnlyList< T > GetObjectTypeList< T > ()
 
IList< MBObjectBaseCreateObjectTypeList (Type objectClassType)
 
void LoadXML (string id, bool isDevelopment, string gameType, bool skipXmlFilterForEditor=false)
 
void LoadOneXmlFromFile (string xmlPath, string xsdPath, bool skipValidation=false)
 
XmlDocument LoadXMLFromFileSkipValidation (string xmlPath, string xsdPath)
 
void LoadXml (XmlDocument doc, bool isDevelopment=false)
 
MBObjectBase CreateObjectFromXmlNode (XmlNode node)
 
MBObjectBase CreateObjectWithoutDeserialize (XmlNode node)
 
void UnregisterNonReadyObjects ()
 Do not call LoadXMLFromFile method after clear operation.
 
void ClearAllObjects ()
 
void ClearAllObjectsWithType (Type type)
 
ReadObjectReferenceFromXml< T > (string attributeName, XmlNode node)
 
MBObjectBase ReadObjectReferenceFromXml (string attributeName, Type objectType, XmlNode node)
 
CreateObject< T > (string stringId)
 
CreateObject< T > ()
 
void DebugPrint (PrintOutputDelegate printOutput)
 
void AddHandler (IObjectManagerHandler handler)
 
void RemoveHandler (IObjectManagerHandler handler)
 
string DebugDump ()
 Debugs the dump.
 
void ReInitialize ()
 
string GetObjectTypeIds ()
 

Static Public Member Functions

static MBObjectManager Init ()
 
static XmlDocument GetMergedXmlForManaged (string id, bool skipValidation, bool ignoreGameTypeInclusionCheck=true, string gameType="")
 
static XmlDocument GetMergedXmlForNative (string id, out List< string > usedPaths)
 
static XmlDocument CreateMergedXmlFile (List< Tuple< string, string > > toBeMerged, List< string > xsltList, bool skipValidation)
 
static XmlDocument ApplyXslt (string xsltPath, XmlDocument baseDocument)
 
static XmlDocument MergeTwoXmls (XmlDocument xmlDocument1, XmlDocument xmlDocument2)
 
static XDocument ToXDocument (XmlDocument xmlDocument)
 
static XmlDocument ToXmlDocument (XDocument xDocument)
 

Properties

static MBObjectManager Instance [get]
 
int NumRegisteredTypes [get]
 
int MaxRegisteredTypes [get]
 

Member Function Documentation

◆ Init()

static MBObjectManager TaleWorlds.ObjectSystem.MBObjectManager.Init ( )
static

◆ Destroy()

void TaleWorlds.ObjectSystem.MBObjectManager.Destroy ( )

◆ RegisterType< T >()

void TaleWorlds.ObjectSystem.MBObjectManager.RegisterType< T > ( string  classPrefix,
string  classListPrefix,
uint  typeId,
bool  autoCreateInstance = true,
bool  isTemporary = false 
)
Type Constraints
T :MBObjectBase 

◆ HasType()

bool TaleWorlds.ObjectSystem.MBObjectManager.HasType ( Type  type)

◆ FindRegisteredClassPrefix()

string TaleWorlds.ObjectSystem.MBObjectManager.FindRegisteredClassPrefix ( Type  type)

◆ FindRegisteredType()

Type TaleWorlds.ObjectSystem.MBObjectManager.FindRegisteredType ( string  classPrefix)

◆ RegisterObject< T >()

T TaleWorlds.ObjectSystem.MBObjectManager.RegisterObject< T > ( obj)
Type Constraints
T :MBObjectBase 

◆ RegisterPresumedObject< T >()

T TaleWorlds.ObjectSystem.MBObjectManager.RegisterPresumedObject< T > ( obj)
Type Constraints
T :MBObjectBase 

◆ UnregisterObject()

void TaleWorlds.ObjectSystem.MBObjectManager.UnregisterObject ( MBObjectBase  obj)

◆ GetObject< T >() [1/2]

T TaleWorlds.ObjectSystem.MBObjectManager.GetObject< T > ( Func< T, bool >  predicate)
Type Constraints
T :MBObjectBase 

◆ GetObject< T >() [2/2]

Type Constraints
T :MBObjectBase 

◆ GetFirstObject< T >()

T TaleWorlds.ObjectSystem.MBObjectManager.GetFirstObject< T > ( )
Type Constraints
T :MBObjectBase 

◆ ContainsObject< T >()

bool TaleWorlds.ObjectSystem.MBObjectManager.ContainsObject< T > ( string  objectName)
Type Constraints
T :MBObjectBase 

◆ RemoveTemporaryTypes()

void TaleWorlds.ObjectSystem.MBObjectManager.RemoveTemporaryTypes ( )

◆ PreAfterLoad()

void TaleWorlds.ObjectSystem.MBObjectManager.PreAfterLoad ( )

◆ AfterLoad()

void TaleWorlds.ObjectSystem.MBObjectManager.AfterLoad ( )

◆ GetObject() [1/2]

MBObjectBase TaleWorlds.ObjectSystem.MBObjectManager.GetObject ( MBGUID  objectId)

◆ GetObject() [2/2]

MBObjectBase TaleWorlds.ObjectSystem.MBObjectManager.GetObject ( string  typeName,
string  objectName 
)

◆ GetObjectTypeList< T >()

MBReadOnlyList< T > TaleWorlds.ObjectSystem.MBObjectManager.GetObjectTypeList< T > ( )
Type Constraints
T :MBObjectBase 

◆ CreateObjectTypeList()

IList< MBObjectBase > TaleWorlds.ObjectSystem.MBObjectManager.CreateObjectTypeList ( Type  objectClassType)

◆ LoadXML()

void TaleWorlds.ObjectSystem.MBObjectManager.LoadXML ( string  id,
bool  isDevelopment,
string  gameType,
bool  skipXmlFilterForEditor = false 
)

◆ GetMergedXmlForManaged()

static XmlDocument TaleWorlds.ObjectSystem.MBObjectManager.GetMergedXmlForManaged ( string  id,
bool  skipValidation,
bool  ignoreGameTypeInclusionCheck = true,
string  gameType = "" 
)
static

◆ GetMergedXmlForNative()

static XmlDocument TaleWorlds.ObjectSystem.MBObjectManager.GetMergedXmlForNative ( string  id,
out List< string >  usedPaths 
)
static

◆ CreateMergedXmlFile()

static XmlDocument TaleWorlds.ObjectSystem.MBObjectManager.CreateMergedXmlFile ( List< Tuple< string, string > >  toBeMerged,
List< string >  xsltList,
bool  skipValidation 
)
static

◆ ApplyXslt()

static XmlDocument TaleWorlds.ObjectSystem.MBObjectManager.ApplyXslt ( string  xsltPath,
XmlDocument  baseDocument 
)
static

◆ MergeTwoXmls()

static XmlDocument TaleWorlds.ObjectSystem.MBObjectManager.MergeTwoXmls ( XmlDocument  xmlDocument1,
XmlDocument  xmlDocument2 
)
static

◆ ToXDocument()

static XDocument TaleWorlds.ObjectSystem.MBObjectManager.ToXDocument ( XmlDocument  xmlDocument)
static

◆ ToXmlDocument()

static XmlDocument TaleWorlds.ObjectSystem.MBObjectManager.ToXmlDocument ( XDocument  xDocument)
static

◆ LoadOneXmlFromFile()

void TaleWorlds.ObjectSystem.MBObjectManager.LoadOneXmlFromFile ( string  xmlPath,
string  xsdPath,
bool  skipValidation = false 
)

◆ LoadXMLFromFileSkipValidation()

XmlDocument TaleWorlds.ObjectSystem.MBObjectManager.LoadXMLFromFileSkipValidation ( string  xmlPath,
string  xsdPath 
)

◆ LoadXml()

void TaleWorlds.ObjectSystem.MBObjectManager.LoadXml ( XmlDocument  doc,
bool  isDevelopment = false 
)

◆ CreateObjectFromXmlNode()

MBObjectBase TaleWorlds.ObjectSystem.MBObjectManager.CreateObjectFromXmlNode ( XmlNode  node)

◆ CreateObjectWithoutDeserialize()

MBObjectBase TaleWorlds.ObjectSystem.MBObjectManager.CreateObjectWithoutDeserialize ( XmlNode  node)

◆ UnregisterNonReadyObjects()

void TaleWorlds.ObjectSystem.MBObjectManager.UnregisterNonReadyObjects ( )

◆ ClearAllObjects()

void TaleWorlds.ObjectSystem.MBObjectManager.ClearAllObjects ( )

◆ ClearAllObjectsWithType()

void TaleWorlds.ObjectSystem.MBObjectManager.ClearAllObjectsWithType ( Type  type)

◆ ReadObjectReferenceFromXml< T >()

T TaleWorlds.ObjectSystem.MBObjectManager.ReadObjectReferenceFromXml< T > ( string  attributeName,
XmlNode  node 
)
Type Constraints
T :MBObjectBase 

◆ ReadObjectReferenceFromXml()

MBObjectBase TaleWorlds.ObjectSystem.MBObjectManager.ReadObjectReferenceFromXml ( string  attributeName,
Type  objectType,
XmlNode  node 
)

◆ CreateObject< T >() [1/2]

T TaleWorlds.ObjectSystem.MBObjectManager.CreateObject< T > ( string  stringId)
Type Constraints
T :MBObjectBase 
T :new() 

◆ CreateObject< T >() [2/2]

T TaleWorlds.ObjectSystem.MBObjectManager.CreateObject< T > ( )
Type Constraints
T :MBObjectBase 
T :new() 

◆ DebugPrint()

void TaleWorlds.ObjectSystem.MBObjectManager.DebugPrint ( PrintOutputDelegate  printOutput)

◆ AddHandler()

void TaleWorlds.ObjectSystem.MBObjectManager.AddHandler ( IObjectManagerHandler  handler)

◆ RemoveHandler()

void TaleWorlds.ObjectSystem.MBObjectManager.RemoveHandler ( IObjectManagerHandler  handler)

◆ DebugDump()

string TaleWorlds.ObjectSystem.MBObjectManager.DebugDump ( )

◆ ReInitialize()

void TaleWorlds.ObjectSystem.MBObjectManager.ReInitialize ( )

◆ GetObjectTypeIds()

string TaleWorlds.ObjectSystem.MBObjectManager.GetObjectTypeIds ( )

Property Documentation

◆ Instance

MBObjectManager TaleWorlds.ObjectSystem.MBObjectManager.Instance
staticget

◆ NumRegisteredTypes

int TaleWorlds.ObjectSystem.MBObjectManager.NumRegisteredTypes
get

◆ MaxRegisteredTypes

int TaleWorlds.ObjectSystem.MBObjectManager.MaxRegisteredTypes
get