Community: Wiki

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:
This page was last modified 13:39, 8 December 2007.

R class

From Forum Nokia Wiki

R classes are proxies for objects owned elsewhere. There are two main motivations for this:

  • The real object is owned by a server in a different thread or address space, or
  • the real object’s implementation must be hidden from the client.

The following are key characteristics of R objects:

  • They contain a handle that is used to pass on requests to other objects
  • They are opened using an "open" function particular to the R class, and closed using a "close" function particular to the class. An R object must be closed once if it has been opened. Generally, the resource associated with an R object is closed automatically if the thread which opened the object terminates.
  • They have no explicit constructor, destructor, copy constructor or assignment operator.

It's also worth noting that

  • There is no common base class for all R classes
  • The initialisation function has a variety of names: also possible are Open(), Create(), Allocate(), etc.
  • The termination function has a variety of names: also possible are Close(), Destroy(), Free(), etc.
  • Since R classes own external resources, there is a requirement for cleanup: this is handled in various ways depending on the class.

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia 
RDF Facets: qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX