Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
CoreModifiable Class Reference

#include <CoreModifiable.h>

Inheritance diagram for CoreModifiable:
GenericRefCountedBaseClass ABaseSystem AlphaMask AObject API3DDeferredFilter AsyncRequest CollisionManager CoreBaseApplication CoreSequenceLauncher CullingObject DictionaryFromJson DictionaryFromJsonUTF16 DirectRenderingMethods DisplayDeviceCaps DoNothingObject FilePathManager FontMapManager HTTPConnect LocalizationManager LuaBehaviour LuaImporter LuaNotificationHook MouseVelocityComputer Node2D RendererProfileDrawingObject RenderingScreen ResourceDownloader RessourceFileManager SceneNode Semaphore SplittableTask SpriteSheetTexture StepByStepImporter TextureFileManager Thread ThreadEvent ThreadPoolManager ThreadProfiler Timer TouchInputEventManager TravState Window

Classes

struct  ImportState
 Import. More...
 

Public Member Functions

void Init ()
 Modifiable managmenent.
 
void EmptyItemList ()
 remove all items (sons)
 
CMSP GetInstanceByPath (const std::string &path)
 return the instance corresponding to the given path in sons tree
 
std::string GetRuntimeID () const
 ID.
 
CoreModifiableAttributegetAttribute (KigsID labelid) const
 Attribute management.
 
u32 getNbArrayElements (KigsID attributeLabel) const
 return element count for an array type attribute
 
template<typename attribute_type , typename value_type >
attribute_type * AddDynamicAttribute (KigsID ID, const value_type &value)
 Dynamic attribute management.
 
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * GetMethods ()
 Method management.
 
bool aggregateWith (CMSP &item, ItemPosition pos=Last)
 Aggregate management.
 
void flagAsNotificationCenterRegistered ()
 Flags.
 
void InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params)
 Utility. More...
 
virtual void InitModifiable ()
 default modifiable init : set all initparams to readonly and set initflag to true More...
 
virtual void UninitModifiable ()
 called when InitModifiable has failled : reset read/write flag on all init params More...
 
virtual void ProtectedDestroy ()
 Destroy method decrement refcounter and delete instance if no more used. More...
 
virtual void addUser (CoreModifiable *user)
 add the given parent to list
 
virtual void removeUser (CoreModifiable *user)
 remove user (parent)
 
virtual bool addItem (const CMSP &item, ItemPosition pos=Last)
 add item at first or last position
 
virtual bool removeItem (const CMSP &item)
 remove item (son)
 

Static Public Member Functions

static std::vector< CMSP > GetRootInstances (const KigsID &cid, bool exactTypeOnly=false)
 static method : return the set of all root instances of the given type
 
static void Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static XMLNodeExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More...
 
static std::string ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static CMSP Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="")
 return an new CoreModifiable instance using the description found in XML file given by name
 
static CMSP GetInstanceByGlobalPath (const std::string &path)
 static method : return the instance corresponding to the given path, and given search start
 
static void debugPrintfFullTree (int maxindent=3)
 Editor. More...
 

Protected Member Functions

void UpdateAggregates (const Timer &timer, void *addParam)
 Internals.
 
void Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings)
 Export. More...
 
CoreModifiableAttributeGenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID)
 create and add dynamic attribute except arrays
 

Static Protected Member Functions

template<typename StringType >
static CMSP Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState)
 recusrive method to add sons and attributes found in the XML file
 

Friends

class CoreModifiableAttribute
 
class KigsCore
 

Detailed Description

Base class for Kigs framework objects. CoreModifiable class manage a list of attributes supporting reflexion and serialization. CoreModifiable also support reference counting, auto update, instance factory...

Member Function Documentation

◆ Append()

void CoreModifiable::Append ( std::string &  XMLString,
const std::list< CoreModifiable * > &  toexport,
bool  recursive,
ExportSettings *  settings = nullptr 
)
static

static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree

call recursive, non static method

◆ debugPrintfFullTree()

void CoreModifiable::debugPrintfFullTree ( int  maxindent = 3)
static

Editor.

Debug

◆ Export() [1/3]

void CoreModifiable::Export ( const std::string &  filename,
CoreModifiable toexport,
bool  recursive = false,
ExportSettings *  settings = nullptr 
)
static

static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree

call recursive, non static method

◆ Export() [2/3]

void CoreModifiable::Export ( std::string &  XMLString,
const std::list< CoreModifiable * > &  toexport,
bool  recursive,
ExportSettings *  settings = nullptr 
)
static

static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree

call recursive, non static method

◆ Export() [3/3]

void CoreModifiable::Export ( std::vector< CoreModifiable * > &  savedList,
XMLNode currentNode,
bool  recursive,
ExportSettings *  settings 
)
protected

Export.

recursive method to export "this" to an XML file.

◆ ExportToXMLNode()

XMLNode * CoreModifiable::ExportToXMLNode ( CoreModifiable toexport,
XML owner_xml_file,
bool  recursive,
ExportSettings *  settings = nullptr 
)
static

static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree

call recursive, non static method

◆ ExportToXMLString()

std::string CoreModifiable::ExportToXMLString ( CoreModifiable toexport,
bool  recursive,
ExportSettings *  settings = nullptr 
)
static

static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree

call recursive, non static method

◆ InitModifiable()

void CoreModifiable::InitModifiable ( )
virtual

default modifiable init : set all initparams to readonly and set initflag to true

already done ? then return

Reimplemented in Mesh, AObject, Camera, ModernMeshItemGroup, API3DUniformDataTexture, Octree, API3DUniformTexture, API3DUniformTexture, UIDynamicText, Base2DLayer, API3DUniformFloat3, API3DUniformFloat3, RenderingScreen, Texture, Node3D, Scene3D, Node2D, Drawable, Billboard3D, ModernMesh, CollisionManager, Panel, KigsBitmap, DrawVertice, Sprite, Light, Window, API3DShader, AObjectSkeletonResource, Thread, Plane, SkyBox, Timer, Node3DDelayed, WorkerThread, StepByStepImporter, HTTPAsyncRequestWindows, ImGuiLayer, DX11RenderingScreen, BaseUI2DLayer, UITextArea, SpriteSheetTexture, UIVideo, Abstract2DLayer, LuaBehaviour, API3DLight, UIText, API3DUniformBase, API3DLight, UIAnimatedButton, API3DUniformBase, UISliderFill, UISlider, UISlidersGroup, OpenGLRenderingScreen, UIScrollView, UIImage, UITextInput, PassiveColoredMask, BSphere, Holo3DPanel, AudioBuffer, UIButtonText, UISprite, LuaImporter, UIButton, API3DGenericMeshShader, UINode3DLayer, UIGroupButton, API3DGenericMeshShader, OpenGLTexture, DX11Texture, UIAnimatedSprite, UIButtonImage, CoreSequenceLauncher, UI3DLinkedItem, CollisionBaseNode, AlphaMask, BCylinder, ThreadPoolManager, UIRenderingScreen, ResourceDownloader, OpenGLMaterial, UIRoundHUD, HTTPConnect, HTTPAsyncRequestWUP, UICustomInputItem, BoxCollider, UIStream, HTTPAsyncRequestAndroid, HTTPConnectAndroid, ColladaParser, OpenGLRenderingScreen, SoundManagerAndroid, HTTPConnectWindows, HTTPAsyncRequestIOS, HTTPAsyncRequestJS, HTTPConnectJS, and HTTPConnectWUP.

◆ InitParametersFromList()

void CoreModifiable::InitParametersFromList ( const std::vector< CoreModifiableAttribute * > *  params)

Utility.

utility method : init CoreModifiable parameters from given parameter list

◆ ProtectedDestroy()

void CoreModifiable::ProtectedDestroy ( )
virtual

Destroy method decrement refcounter and delete instance if no more used.

remove all items

Reimplemented in Camera, DrawVertice, API3DShader, API3DUniformBase, DX11Texture, and OpenGLTexture.

◆ UninitModifiable()

void CoreModifiable::UninitModifiable ( )
virtual

called when InitModifiable has failled : reset read/write flag on all init params

not init ? return

Reimplemented in Camera, Texture, Scene3D, DX11RenderingScreen, LuaBehaviour, OpenGLRenderingScreen, OpenGLTexture, and DX11Texture.


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