SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
Index-Based Instance Identification



                                                      Version 1.1
                                              December 27, 2006




PathMATE Technical Notes



                                         Pathfinder Solutions LLC
                                     33 Commercial Drive, Suite 2
                                         Foxboro, MA 02035 USA
                                          www.PathfinderMDA.com
                                                   888-662-7284




          ©2005 by Pathfinder Solutions
Table Of Contents
1.   Introduction .......................................................................................... 1

2.   Usage .................................................................................................... 1

3.   Implementation .................................................................................... 2
     New Mechanism - PfdInstanceMap ............................................................. 2
     Instance creation - array .......................................................................... 2
     Class-based finds .................................................................................... 2
     Instance deletion - array .......................................................................... 2

4.   Implementation Notes .......................................................................... 3




                                                       ii
Index-based Instance Identification




1. Introduction
Index-based instance identification allows for the efficient retrieval of object
instances from an instance population. Object instances using index-based instance
identification contain an “identifier” attribute - indicated by the IndexID marking -
that uniquely identifies the instance. This marking will result in the generation of an
instance population structure that uses the C++ Standard Template Library
std::map, reducing FIND/WHERE constructs based on the id attribute to map lookup
via std::map::find().
Alternatively when used in conjunction with the MaxIndex class marking, this will
result in the generation of an instance population structure using an array, reducing
FIND/WHERE constructs based on the id attribute to a direct array element access.
The following diagram show how the index-based instance population management
manages the instance table. The class is defined to have an attribute named “ID”
which is marked as the instance identifier. When instances of the class are created,
the value of the “ID” attribute is used to determine the location in the population
table where the instance will reside.



                                                         Instance 0
         Instance 0                                        ID = 0

         Instance 1


             …

                                                         Instance n
         Instance n                                   ID = MaxIndex-1


          Instance
         Population
            Table




When PAL FINDs are used to locate an instance using the “ID” attribute in a where
clause, the implementation can perform a rapid index-based retrieval of the object
rather than performing the usual linear table search strategy.

2. Usage
To enable index-based instance identification, one of the class’ attributes must be
marked with the IndexID value set to “TRUE”. Normally, this marking takes place
in the properties.txt file during transformation.
Optionally the class can use the MaxIndex marking to enable array-based instance
management.


                                           1
Index-based Instance Identification



Transformation-time errors are logged using the Transformation Engine’s
LOG_MESSAGE statement in the following cases:
     More than one attribute is marked with the IndexID marking.
     The attribute marked with the IndexID marking is not typed as an integer.
     An attribute is marked with IndexID but the MaxIndex marking is not
       enabled.
At runtime, it is an error to:
     Create an instance whose index is negative or greater than the limits imposed
       by the MaxIndex marking.
     Create multiple instances with the same index value.


3. Implementation
Index-based instance identification affects several areas of the design including:
    how instances plug themselves into the instance population set.
    how WHERE clauses are processed when the index attribute is specified in the
      clause
    how instances unplug themselves from the instance population

      New Mechanism - PfdInstanceMap
      For non-array based storage the PfdInstanceMap class is used. This class
      encapsulates the usage of the std::map.

      Instance creation - array
      The instance “plug-in” handling for object instances changes when the
      IndexID marking is used. Without the index ID marking, an object instance
      is inserted into the first available slot in the table. With the IndexID
      marking, the instance is inserted at the offset specified by the value of the
      index attribute. If the slot is already occupied, the plug-in code should not
      overwrite the existing instance. With the IndexID marking, the instance
      table may be sparsely populated. Any iteration over the instance table must
      guarantee that empty entries are handled gracefully.

      Class-based finds
      The generation of class-based finds will be modified to detect cases where the
      find operation can be optimized with index-based lookups for the instance
      population. Given the case where a find expression’s “WHERE” clause
      contains only the IndexID attribute in an equivalence comparison, the
      implementation can efficiently retrieve the instance from the table without
      having to search the entire population. Additional optimization should be
      possible for where clauses that contain the IndexID attribute when used in
      conjunction with a logical-and operation.

      Instance deletion - array
      The instance deletion (“unplug”) handling must clear the object instance from
      its slot in the instance table. This must be done without altering the offsets of
      any subsequent entries in the instance population.



                                          2
Index-based Instance Identification




4. Implementation Notes
     Assignment to an attribute marked with the IndexID marking is not
      supported. This attribute should be treated as a constant and not changed
      over the lifetime of the instance.




                                        3

Weitere ähnliche Inhalte

Ähnlich wie Index Based Instance Identification

ICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code DescriptionsICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code DescriptionsSebastiano Panichella
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsSaurabh Narula
 
Compass Framework
Compass FrameworkCompass Framework
Compass FrameworkLukas Vlcek
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)MongoDB
 
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)MongoDB
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkitnikhilyagnic
 
Object-oriented programming
Object-oriented programmingObject-oriented programming
Object-oriented programmingNeelesh Shukla
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core DataMake School
 
AEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene IndexesAEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene IndexesAdobeMarketingCloud
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfDavid Harrison
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfDavid Harrison
 
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache SparkAttribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache SparkIRJET Journal
 
Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26kreuter
 
285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.ppt285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.pptntrnbk
 
unit 4,Indexes in database.docx
unit 4,Indexes in database.docxunit 4,Indexes in database.docx
unit 4,Indexes in database.docxRaviRajput416403
 
Indexing Strategies
Indexing StrategiesIndexing Strategies
Indexing Strategiesjlaspada
 
quickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotationsquickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotationsjorgesimao71
 

Ähnlich wie Index Based Instance Identification (20)

ICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code DescriptionsICPC 2012 - Mining Source Code Descriptions
ICPC 2012 - Mining Source Code Descriptions
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
 
Asp.net boilerplate
Asp.net boilerplateAsp.net boilerplate
Asp.net boilerplate
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
 
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
 
Object-oriented programming
Object-oriented programmingObject-oriented programming
Object-oriented programming
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
 
Oak Lucene Indexes
Oak Lucene IndexesOak Lucene Indexes
Oak Lucene Indexes
 
AEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene IndexesAEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene Indexes
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache SparkAttribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
Attribute Reduction:An Implementation of Heuristic Algorithm using Apache Spark
 
Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26Mongophilly indexing-2011-04-26
Mongophilly indexing-2011-04-26
 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core Location
 
285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.ppt285109443-SAP-BW-Info-Object.ppt
285109443-SAP-BW-Info-Object.ppt
 
unit 4,Indexes in database.docx
unit 4,Indexes in database.docxunit 4,Indexes in database.docx
unit 4,Indexes in database.docx
 
Indexing Strategies
Indexing StrategiesIndexing Strategies
Indexing Strategies
 
quickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotationsquickguide-einnovator-2-spring4-dependency-injection-annotations
quickguide-einnovator-2-spring4-dependency-injection-annotations
 

Kürzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Kürzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Index Based Instance Identification

  • 1. Index-Based Instance Identification Version 1.1 December 27, 2006 PathMATE Technical Notes Pathfinder Solutions LLC 33 Commercial Drive, Suite 2 Foxboro, MA 02035 USA www.PathfinderMDA.com 888-662-7284 ©2005 by Pathfinder Solutions
  • 2. Table Of Contents 1. Introduction .......................................................................................... 1 2. Usage .................................................................................................... 1 3. Implementation .................................................................................... 2 New Mechanism - PfdInstanceMap ............................................................. 2 Instance creation - array .......................................................................... 2 Class-based finds .................................................................................... 2 Instance deletion - array .......................................................................... 2 4. Implementation Notes .......................................................................... 3 ii
  • 3. Index-based Instance Identification 1. Introduction Index-based instance identification allows for the efficient retrieval of object instances from an instance population. Object instances using index-based instance identification contain an “identifier” attribute - indicated by the IndexID marking - that uniquely identifies the instance. This marking will result in the generation of an instance population structure that uses the C++ Standard Template Library std::map, reducing FIND/WHERE constructs based on the id attribute to map lookup via std::map::find(). Alternatively when used in conjunction with the MaxIndex class marking, this will result in the generation of an instance population structure using an array, reducing FIND/WHERE constructs based on the id attribute to a direct array element access. The following diagram show how the index-based instance population management manages the instance table. The class is defined to have an attribute named “ID” which is marked as the instance identifier. When instances of the class are created, the value of the “ID” attribute is used to determine the location in the population table where the instance will reside. Instance 0 Instance 0 ID = 0 Instance 1 … Instance n Instance n ID = MaxIndex-1 Instance Population Table When PAL FINDs are used to locate an instance using the “ID” attribute in a where clause, the implementation can perform a rapid index-based retrieval of the object rather than performing the usual linear table search strategy. 2. Usage To enable index-based instance identification, one of the class’ attributes must be marked with the IndexID value set to “TRUE”. Normally, this marking takes place in the properties.txt file during transformation. Optionally the class can use the MaxIndex marking to enable array-based instance management. 1
  • 4. Index-based Instance Identification Transformation-time errors are logged using the Transformation Engine’s LOG_MESSAGE statement in the following cases:  More than one attribute is marked with the IndexID marking.  The attribute marked with the IndexID marking is not typed as an integer.  An attribute is marked with IndexID but the MaxIndex marking is not enabled. At runtime, it is an error to:  Create an instance whose index is negative or greater than the limits imposed by the MaxIndex marking.  Create multiple instances with the same index value. 3. Implementation Index-based instance identification affects several areas of the design including:  how instances plug themselves into the instance population set.  how WHERE clauses are processed when the index attribute is specified in the clause  how instances unplug themselves from the instance population New Mechanism - PfdInstanceMap For non-array based storage the PfdInstanceMap class is used. This class encapsulates the usage of the std::map. Instance creation - array The instance “plug-in” handling for object instances changes when the IndexID marking is used. Without the index ID marking, an object instance is inserted into the first available slot in the table. With the IndexID marking, the instance is inserted at the offset specified by the value of the index attribute. If the slot is already occupied, the plug-in code should not overwrite the existing instance. With the IndexID marking, the instance table may be sparsely populated. Any iteration over the instance table must guarantee that empty entries are handled gracefully. Class-based finds The generation of class-based finds will be modified to detect cases where the find operation can be optimized with index-based lookups for the instance population. Given the case where a find expression’s “WHERE” clause contains only the IndexID attribute in an equivalence comparison, the implementation can efficiently retrieve the instance from the table without having to search the entire population. Additional optimization should be possible for where clauses that contain the IndexID attribute when used in conjunction with a logical-and operation. Instance deletion - array The instance deletion (“unplug”) handling must clear the object instance from its slot in the instance table. This must be done without altering the offsets of any subsequent entries in the instance population. 2
  • 5. Index-based Instance Identification 4. Implementation Notes  Assignment to an attribute marked with the IndexID marking is not supported. This attribute should be treated as a constant and not changed over the lifetime of the instance. 3