Hci Assignment

Read Complete Research Material

HCI ASSIGNMENT

HCI Assignment

HCI Assignment

Outline

This paper presents such a scheme which applies kind variables (typeids), generalized pointer casting and object building from run-time provided typeids. A straightforward procedure to add these amenities to any C++ class hierarchy is presented.

Introduction

RTTI is applied as facts and numbers organisations developed by the compiler while amassing a program. The general concept is to permit data recounting diverse classes of kinds to be accessible at run-time for written check and really more creative purposes. Normally, kinds are advised to only be accessible at compile-time, utilised by the compiler to recognise storage obligations, to double-check befitting standards are utilised with diverse variables and so on. RTTI entails we have additional data accessible to query for our own purposes.

On the entire, RTTI arrives in two zests: attainingt kind data from run-time components like pointers and quotations and getting kind data from 'static' components like classes.

Since this data is to be passed to the client (who will control it at runtime), we require a way to encode it in some run-time object. Such an object is called a typeid and holds all data which distinuishes a C++ type. In other phrases, for any C++ kind there is a typeid object which encodes its type. In remainder of this paper we will recognise the C++ kind notion with the C++ class notion, therefore disregarding rudimentary kinds like int, ride high, etc.

To accurate notions, a typeid for a pointer or quotation will symbolize the kind of the genuine object sharp by that pointer or mentioned to by that reference. The typeid for a class will conspicuously symbolize the kind of that class.

If we have a entails to get a typeid from a pointer, quotation or class, we can supply a twosome of helpful procedures on typeids:

• 1. Type names: Given a typeid, which is an abstract encoding of a kind, we would like to get a textual symbolizeation of it. For illustartions, for a C++ class A, we would like to get a feature string "A" from its typeid.

• 2. Typeid comparison: Given two typeids, we should be adept to work out if they symbolize the identical kind or if they symbolize kinds associated by inheritance or unrelated types.

• 3. Pointer and quotation casting: Given a pointer and a typeid, we can work out if the genuine sharp object is of the kind symbolizeed by that typeid. Furthermore, we could cast a granted pointer p to a C++ kind encoded by a granted typeid at runtime and, if the cast does well, come back a pointer p' of kind t.

• 4. Run-time object creation: Given a typeid t,we would like to conceive an object of kind t and come back it as a a pointer of kind t.

2 Operation 1 permits us to contrast kinds at run-time and work out their association (e.g. subclass to superclass). Operation 2 charts kinds to a textual symbolizeation which can be essential if the client yearns to be granted kind data in a ...
Related Ads
  • Culture And Hci
    www.researchomatic.com...

    Culture and HCI Abstract Technology changes s ...

  • Hci Assignment 2
    www.researchomatic.com...

    Hci Assignment 2, Hci Assignment 2 Ess ...

  • Hci Security
    www.researchomatic.com...

    The intersection of human computer interaction ...

  • Case Study Assignment
    www.researchomatic.com...

    Case Study Assignment , Case Study Assignme ...

  • Hci Project
    www.researchomatic.com...

    HCI PROJECT Human-Computer Interaction ...