SlideShare a Scribd company logo
1 of 18
MEngine Overview Everything is a CObject! CObject
Why? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How? ,[object Object],[object Object],[object Object]
A B C D E F G H Normal objects in C and C++ are arranged as arrays or vectors in memory
CObjects lets you forget about how they are arranged in memory Even though they started out contiguous in memory A B C D E F G H
Changing the List ,[object Object],[object Object],[object Object]
A B C D E F G H Remove B from an Array Element *pElement = new Element;
B B->Remove(pList); OR pList->RemoveCObject(B); Remove CObject “B” from a CLinkList “pList” pList A C D E F G H
B Add or Append CObject “B” to CLinkList “pList” pList->AppendCObject(B); pList C D E F G H A pList->AddCObject(A);
pList C D Prev Next G H A pList->InsertCObject(Prev, A);
Factory Paradigm ,[object Object],[object Object],[object Object],[object Object]
Allocating a CObject from its CObjectFactory CObjectFactory *pFactory B Other lists A->OnAlloc(); is called Automatically! m_pFreeList m_pUsedList C D E F G H A pFactory->AllocObject()
Adding the CObject to a CLinkList CLinkList *pList = CLinkManager::GetSingleton()->CreateLinkList(); m_pUsedList A pList->AddCObject(A); OR pList->AppendCObject(A);
Remove a CObject from all lists: A DisplayList TransformList AnimationList m_pUsedList A->Remove(NULL); OR A->Remove(); WARNING: Removes A from its factory’s UsedList
CObjectFactory Release a CObject m_pUsedList DisplayList TransformList AnimationList m_pFreeList A A->Release(); A->OnRelease(); is called Automatically!
Everything is a CObject ,[object Object],[object Object],[object Object],[object Object]
Think in CObjects! ,[object Object],[object Object],[object Object],[object Object]
For more details ,[object Object]

More Related Content

What's hot

STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureYaksh Jethva
 
Stack application
Stack applicationStack application
Stack applicationStudent
 
.Net 4.0 Threading and Parallel Programming
.Net 4.0 Threading and Parallel Programming.Net 4.0 Threading and Parallel Programming
.Net 4.0 Threading and Parallel ProgrammingAlex Moore
 
Computer notes - Josephus Problem
Computer notes - Josephus ProblemComputer notes - Josephus Problem
Computer notes - Josephus Problemecomputernotes
 
Data Structure and Algorithms Queues
Data Structure and Algorithms QueuesData Structure and Algorithms Queues
Data Structure and Algorithms QueuesManishPrajapati78
 
Quick 入門 | iOS RDD テストフレームワーク for Swift/Objective-C
Quick 入門 | iOS RDD テストフレームワーク for Swift/Objective-CQuick 入門 | iOS RDD テストフレームワーク for Swift/Objective-C
Quick 入門 | iOS RDD テストフレームワーク for Swift/Objective-CYuki Tanabe
 
Data Structure and Algorithms Stacks
Data Structure and Algorithms StacksData Structure and Algorithms Stacks
Data Structure and Algorithms StacksManishPrajapati78
 
computer notes - Data Structures - 5
computer notes - Data Structures - 5computer notes - Data Structures - 5
computer notes - Data Structures - 5ecomputernotes
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stackvaibhav2910
 
IGraph a tool to analyze your network
IGraph a tool to analyze your networkIGraph a tool to analyze your network
IGraph a tool to analyze your networkPushpendra Tiwari
 
Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxsandeep54552
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTUREArchie Jamwal
 

What's hot (20)

Permute
PermutePermute
Permute
 
Permute
PermutePermute
Permute
 
Stack - Data Structure
Stack - Data StructureStack - Data Structure
Stack - Data Structure
 
STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
 
Stack application
Stack applicationStack application
Stack application
 
Data structure Stack
Data structure StackData structure Stack
Data structure Stack
 
.Net 4.0 Threading and Parallel Programming
.Net 4.0 Threading and Parallel Programming.Net 4.0 Threading and Parallel Programming
.Net 4.0 Threading and Parallel Programming
 
Computer notes - Josephus Problem
Computer notes - Josephus ProblemComputer notes - Josephus Problem
Computer notes - Josephus Problem
 
Data Structure and Algorithms Queues
Data Structure and Algorithms QueuesData Structure and Algorithms Queues
Data Structure and Algorithms Queues
 
Stack of Data structure
Stack of Data structureStack of Data structure
Stack of Data structure
 
Queue
QueueQueue
Queue
 
Quick 入門 | iOS RDD テストフレームワーク for Swift/Objective-C
Quick 入門 | iOS RDD テストフレームワーク for Swift/Objective-CQuick 入門 | iOS RDD テストフレームワーク for Swift/Objective-C
Quick 入門 | iOS RDD テストフレームワーク for Swift/Objective-C
 
Data Structure and Algorithms Stacks
Data Structure and Algorithms StacksData Structure and Algorithms Stacks
Data Structure and Algorithms Stacks
 
computer notes - Data Structures - 5
computer notes - Data Structures - 5computer notes - Data Structures - 5
computer notes - Data Structures - 5
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
 
Conversion of Infix To Postfix Expressions
Conversion of Infix To Postfix Expressions Conversion of Infix To Postfix Expressions
Conversion of Infix To Postfix Expressions
 
IGraph a tool to analyze your network
IGraph a tool to analyze your networkIGraph a tool to analyze your network
IGraph a tool to analyze your network
 
Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptx
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Stacks in Data Structure
Stacks in Data StructureStacks in Data Structure
Stacks in Data Structure
 

Viewers also liked

Introduction Presentation Jul09
Introduction Presentation Jul09Introduction Presentation Jul09
Introduction Presentation Jul09guest072879
 
Introducing Cairngorm
Introducing CairngormIntroducing Cairngorm
Introducing CairngormJairo Gatjens
 
New to Crew Health and Fitness
New to Crew Health and FitnessNew to Crew Health and Fitness
New to Crew Health and FitnessCrewHealthFitness
 
MEngine Advanced
MEngine AdvancedMEngine Advanced
MEngine Advancedeuming
 
Online Scientific Method Forensics 2009
Online Scientific Method Forensics 2009Online Scientific Method Forensics 2009
Online Scientific Method Forensics 2009guestf0024fc
 

Viewers also liked (7)

Less
LessLess
Less
 
What
WhatWhat
What
 
Introduction Presentation Jul09
Introduction Presentation Jul09Introduction Presentation Jul09
Introduction Presentation Jul09
 
Introducing Cairngorm
Introducing CairngormIntroducing Cairngorm
Introducing Cairngorm
 
New to Crew Health and Fitness
New to Crew Health and FitnessNew to Crew Health and Fitness
New to Crew Health and Fitness
 
MEngine Advanced
MEngine AdvancedMEngine Advanced
MEngine Advanced
 
Online Scientific Method Forensics 2009
Online Scientific Method Forensics 2009Online Scientific Method Forensics 2009
Online Scientific Method Forensics 2009
 

Similar to MEngine Overview

Stack and its applications
Stack and its applicationsStack and its applications
Stack and its applicationsAhsan Mansiv
 
Lec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptxLec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptxhaaamin01
 
Create a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docxCreate a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docxrajahchelsey
 
Stl Containers
Stl ContainersStl Containers
Stl Containersppd1961
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Languagesatvirsandhu9
 
삼성 바다 앱개발 실패 노하우 2부
삼성 바다 앱개발 실패 노하우 2부삼성 바다 앱개발 실패 노하우 2부
삼성 바다 앱개발 실패 노하우 2부mosaicnet
 
computer notes - Data Structures - 6
computer notes - Data Structures - 6computer notes - Data Structures - 6
computer notes - Data Structures - 6ecomputernotes
 
Data structure , stack , queue
Data structure , stack , queueData structure , stack , queue
Data structure , stack , queueRajkiran Nadar
 
computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8ecomputernotes
 
Use the following data set that compares age to average years lef.docx
Use the following data set that compares age to average years lef.docxUse the following data set that compares age to average years lef.docx
Use the following data set that compares age to average years lef.docxdickonsondorris
 
Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Getachew Ganfur
 
UIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlinUIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlinMaxim Zaks
 
STL ALGORITHMS
STL ALGORITHMSSTL ALGORITHMS
STL ALGORITHMSfawzmasood
 

Similar to MEngine Overview (20)

Stack and its applications
Stack and its applicationsStack and its applications
Stack and its applications
 
Lec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptxLec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptx
 
List in java
List in javaList in java
List in java
 
Create a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docxCreate a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docx
 
Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
 
Stl Containers
Stl ContainersStl Containers
Stl Containers
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
삼성 바다 앱개발 실패 노하우 2부
삼성 바다 앱개발 실패 노하우 2부삼성 바다 앱개발 실패 노하우 2부
삼성 바다 앱개발 실패 노하우 2부
 
computer notes - Data Structures - 6
computer notes - Data Structures - 6computer notes - Data Structures - 6
computer notes - Data Structures - 6
 
Data structure , stack , queue
Data structure , stack , queueData structure , stack , queue
Data structure , stack , queue
 
computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8
 
Use the following data set that compares age to average years lef.docx
Use the following data set that compares age to average years lef.docxUse the following data set that compares age to average years lef.docx
Use the following data set that compares age to average years lef.docx
 
Lecture 3 c++
Lecture 3 c++Lecture 3 c++
Lecture 3 c++
 
LectureNotes-06-DSA
LectureNotes-06-DSALectureNotes-06-DSA
LectureNotes-06-DSA
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
STLStack.pdf
STLStack.pdfSTLStack.pdf
STLStack.pdf
 
Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9
 
Rana Junaid Rasheed
Rana Junaid RasheedRana Junaid Rasheed
Rana Junaid Rasheed
 
UIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlinUIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlin
 
STL ALGORITHMS
STL ALGORITHMSSTL ALGORITHMS
STL ALGORITHMS
 

MEngine Overview

  • 1. MEngine Overview Everything is a CObject! CObject
  • 2.
  • 3.
  • 4. A B C D E F G H Normal objects in C and C++ are arranged as arrays or vectors in memory
  • 5. CObjects lets you forget about how they are arranged in memory Even though they started out contiguous in memory A B C D E F G H
  • 6.
  • 7. A B C D E F G H Remove B from an Array Element *pElement = new Element;
  • 8. B B->Remove(pList); OR pList->RemoveCObject(B); Remove CObject “B” from a CLinkList “pList” pList A C D E F G H
  • 9. B Add or Append CObject “B” to CLinkList “pList” pList->AppendCObject(B); pList C D E F G H A pList->AddCObject(A);
  • 10. pList C D Prev Next G H A pList->InsertCObject(Prev, A);
  • 11.
  • 12. Allocating a CObject from its CObjectFactory CObjectFactory *pFactory B Other lists A->OnAlloc(); is called Automatically! m_pFreeList m_pUsedList C D E F G H A pFactory->AllocObject()
  • 13. Adding the CObject to a CLinkList CLinkList *pList = CLinkManager::GetSingleton()->CreateLinkList(); m_pUsedList A pList->AddCObject(A); OR pList->AppendCObject(A);
  • 14. Remove a CObject from all lists: A DisplayList TransformList AnimationList m_pUsedList A->Remove(NULL); OR A->Remove(); WARNING: Removes A from its factory’s UsedList
  • 15. CObjectFactory Release a CObject m_pUsedList DisplayList TransformList AnimationList m_pFreeList A A->Release(); A->OnRelease(); is called Automatically!
  • 16.
  • 17.
  • 18.

Editor's Notes

  1. First create a linked list. Then add your CObject to the linked list. Note that the CObject A is already attached to its factory’s used list.