<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.limswiki.org/index.php?action=history&amp;feed=atom&amp;title=Encapsulation_%28object-oriented_programming%29</id>
	<title>Encapsulation (object-oriented programming) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.limswiki.org/index.php?action=history&amp;feed=atom&amp;title=Encapsulation_%28object-oriented_programming%29"/>
	<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Encapsulation_(object-oriented_programming)&amp;action=history"/>
	<updated>2026-04-06T03:59:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://www.limswiki.org/index.php?title=Encapsulation_(object-oriented_programming)&amp;diff=49399&amp;oldid=prev</id>
		<title>Shawndouglas: /* References */ Cat</title>
		<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Encapsulation_(object-oriented_programming)&amp;diff=49399&amp;oldid=prev"/>
		<updated>2022-09-19T23:07:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;References: &lt;/span&gt; Cat&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:07, 19 September 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l125&quot;&gt;Line 125:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 125:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!---Place all category tags here--&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!---Place all category tags here--&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Software &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and hardware terms&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Software &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;development&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key limswiki:diff::1.12:old-15630:rev-49399 --&gt;
&lt;/table&gt;</summary>
		<author><name>Shawndouglas</name></author>
	</entry>
	<entry>
		<id>https://www.limswiki.org/index.php?title=Encapsulation_(object-oriented_programming)&amp;diff=15630&amp;oldid=prev</id>
		<title>Shawndouglas: /* Notes */ Corrected link</title>
		<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Encapsulation_(object-oriented_programming)&amp;diff=15630&amp;oldid=prev"/>
		<updated>2014-08-29T16:59:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Notes: &lt;/span&gt; Corrected link&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:59, 29 August 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l119&quot;&gt;Line 119:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 119:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article reuses numerous content elements from [http://en.wikipedia.org/wiki/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ebXML &lt;/del&gt;the Wikipedia article].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article reuses numerous content elements from [http://en.wikipedia.org/wiki/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Encapsulation_%28object-oriented_programming%29 &lt;/ins&gt;the Wikipedia article].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key limswiki:diff::1.12:old-15629:rev-15630 --&gt;
&lt;/table&gt;</summary>
		<author><name>Shawndouglas</name></author>
	</entry>
	<entry>
		<id>https://www.limswiki.org/index.php?title=Encapsulation_(object-oriented_programming)&amp;diff=15629&amp;oldid=prev</id>
		<title>Shawndouglas: Created as needed.</title>
		<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Encapsulation_(object-oriented_programming)&amp;diff=15629&amp;oldid=prev"/>
		<updated>2014-08-29T16:58:03Z</updated>

		<summary type="html">&lt;p&gt;Created as needed.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Encapsulation''' is one of the four fundamentals of object-oriented programming (OOP), involving the concept of &amp;quot;bundling data with the methods that operate on that data.&amp;quot;&amp;lt;ref name=&amp;quot;RogersEnc&amp;quot;&amp;gt;{{cite web |url=http://www.javaworld.com/article/2075271/core-java/encapsulation-is-not-information-hiding.html |title=Encapsulation is not information hiding |author=Rogers, William Paul |work=JavaWorld |date=18 May 2001 |accessdate=28 August 2014}}&amp;lt;/ref&amp;gt; Encapsulation places the values or state of a structured data object within a class, preventing unauthorized access to them. Publicly accessible methods are generally provided in the class (so-called &amp;quot;getters&amp;quot; and &amp;quot;setters&amp;quot;) to access the values or state, and other client classes call these methods to retrieve and modify the values within the object. In some programming languages, this concept should not be interpreted as hiding; for example, in Java data can be encapsulated but also remain unhidden.&amp;lt;ref name=&amp;quot;RogersEnc&amp;quot; /&amp;gt; Additionally, encapsulation is not unique to object-oriented programming. Implementations of abstract data types like modules offers a similar form of encapsulation.&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
In programming languages, &amp;quot;encapsulation&amp;quot; is used to refer to one of two related but distinct notions (and sometimes to both)&amp;lt;ref name=&amp;quot;ScottPrag&amp;quot;&amp;gt;{{cite book |url=http://books.google.com/books?id=GBISkhhrHh8C&amp;amp;pg=PA449 |chapter=Chapter 9: Data Abstraction and Object Orientation |title=Programming Language Pragmatics |author=Scott, Michael Lee |publisher=Morgan Kaufmann |edition=3rd |pages=449–500 |isbn=9780080922997 |year=2009 |accessdate=29 August 2014}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;DaleJava&amp;quot;&amp;gt;{{cite book |url=http://books.google.com/books?id=qBKO1b8CsNUC |chapter=Chapter 8: Object-Oriented Software Engineering |title=Programming and Problem Solving with Java |author=Dale, Nell B.; Weems, Chip |publisher=Jones &amp;amp; Bartlett Publishers |edition=2nd |pages=394–451 |year=2008 |isbn=9780763734022 |accessdate=29 August 2014}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;PierceTypes&amp;quot;&amp;gt;{{cite book |url=http://books.google.com/books?id=ti6zoAC9Ph8C |chapter=Chapter 20: Recursive Types |title=Types and Programming Languages |author=Pierce, Benjamin C. |publisher=MIT Press |year=2002 |pages=265–280 |isbn=9780262162098 |accessdate=29 August 2014}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;RogersEnc&amp;quot; /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* a language mechanism for restricting access to some of the object's components&lt;br /&gt;
&lt;br /&gt;
* a language construct that facilitates the hiding of data with the functions operating on that data&lt;br /&gt;
&lt;br /&gt;
Some programming language researchers and academics use the first meaning alone or in combination with the second as a distinguishing feature of OOP, while other programming languages which provide lexical closures view encapsulation as a feature of the language orthogonal to object orientation. The second definition is motivated by the fact that in many OOP languages the placement of components is not automatic or can be overridden; thus, information hiding is defined as a separate notion by those who prefer the second definition.&lt;br /&gt;
&lt;br /&gt;
==As an information hiding mechanism==&lt;br /&gt;
&lt;br /&gt;
Under the second definition of &amp;quot;hiding,&amp;quot; the internal representation of an object is generally hidden from view outside of the object's definition. Typically, only the object's own methods can directly inspect or manipulate its fields. Some languages like Smalltalk and Ruby only allow access via object methods, but most others (e.g. C++, C#, or Java) offer the programmer a degree of control over what is hidden, typically via keywords like &amp;lt;code&amp;gt;public&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;PierceTypes&amp;quot; /&amp;gt; Note that the ISO C++ standard refers to &amp;lt;code&amp;gt;protected&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;public&amp;lt;/code&amp;gt; as &amp;quot;access specifiers&amp;quot; and that they do not strictly hide information.&amp;lt;ref name=&amp;quot;ISO3690&amp;quot;&amp;gt;{{cite web |url=https://isocpp.org/files/papers/N3690.pdf |format=PDF |title=ISO/IEC JTC 1/SC22 N3690 |publisher=ISO |pages=238–239 |date=15 May 2013 |accessdate=29 august 2014}}&amp;lt;/ref&amp;gt; Information hiding is accomplished by furnishing a compiled version of the source code that is interfaced via a header file.&lt;br /&gt;
&lt;br /&gt;
Hiding the internals of the object protects its integrity by preventing users from setting the internal data of the component into an invalid or inconsistent state. A supposed benefit of encapsulation is that it can reduce system complexity, and thus increase robustness, by allowing the developer to limit the inter-dependencies between software components.&amp;lt;ref name=&amp;quot;AdobeOOP&amp;quot;&amp;gt;{{cite web |url=http://www.adobe.com/devnet/actionscript/learning/oop-concepts/encapsulation.html |title=Object-oriented programming concepts: Encapsulation |author=Yaiser, Michelle |publisher=Adobe Systems Incorporated |date=31 October 2011 |accessdate=29 August 2014}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;PattersonDep&amp;quot;&amp;gt;{{cite web |url=http://lostechies.com/chrispatterson/2014/01/03/separating-concerns-part-2-services/ |title=Separating Concerns – Part 2: Services |author=Patterson, Chris |work=Los Techies |date=03 January 2014 |accessdate=29 August 2014}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is an example in C# that shows how access to a data field can be restricted through the use of a &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt; keyword:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
class Program {&lt;br /&gt;
	public class Account {&lt;br /&gt;
		private decimal accountBalance = 500.00m;&lt;br /&gt;
&lt;br /&gt;
		public decimal CheckBalance() {&lt;br /&gt;
			return accountBalance;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	static void Main() {&lt;br /&gt;
		Account myAccount = new Account();&lt;br /&gt;
		decimal myBalance = myAccount.CheckBalance();&lt;br /&gt;
&lt;br /&gt;
		/* This Main method can check the balance via the public&lt;br /&gt;
		* &amp;quot;CheckBalance&amp;quot; method provided by the &amp;quot;Account&amp;quot; class &lt;br /&gt;
		* but it cannot manipulate the value of &amp;quot;accountBalance&amp;quot; */&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is an example in Java:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
public class Employee {&lt;br /&gt;
    private BigDecimal salary = new BigDecimal(50000.00);&lt;br /&gt;
    &lt;br /&gt;
    public BigDecimal getSalary() {&lt;br /&gt;
        return salary;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public static void main() {&lt;br /&gt;
        Employee e = new Employee();&lt;br /&gt;
        BigDecimal sal = e.getSalary();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
PHP offers a more simplistic approach&amp;lt;ref name=&amp;quot;PHPVis&amp;quot;&amp;gt;{{cite web |url=http://php.net/manual/en/language.oop5.visibility.php |title=PHP: Visibility |work=PHP Manual |author=Achour, Mehdi; Betz, Friedhelm; Dovgal, Antony; Lopes, Nuno; Magnusson, Hannes; Richter, Georg; Seguy, Damien; Vrana, Jakub |publisher=The PHP Group |date=29 August 2014 |accessdate=29 August 2014}}&amp;lt;/ref&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;public&amp;lt;/code&amp;gt; - The method is publicly available and can be accessed by all subclasses.&lt;br /&gt;
* &amp;lt;code&amp;gt;protected&amp;lt;/code&amp;gt; - The method/function/property is available to the parent class and all inheriting classes.&lt;br /&gt;
* &amp;lt;code&amp;gt;private&amp;lt;/code&amp;gt; - The method is private and only available to the parent or base class.&lt;br /&gt;
&lt;br /&gt;
Below is an example in PHP:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
	class person {		&lt;br /&gt;
	var $name;		&lt;br /&gt;
		public $height;		&lt;br /&gt;
		protected $social_insurance;&lt;br /&gt;
		private $pinn_number;&lt;br /&gt;
		&lt;br /&gt;
		function __construct($persons_name) {		&lt;br /&gt;
			$this-&amp;gt;name = $persons_name;		&lt;br /&gt;
		}		&lt;br /&gt;
		&lt;br /&gt;
		function set_name($new_name) {   	&lt;br /&gt;
			$this-&amp;gt;name = $new_name;&lt;br /&gt;
		}	&lt;br /&gt;
&lt;br /&gt;
		function get_name() {&lt;br /&gt;
			return $this-&amp;gt;name;&lt;br /&gt;
		}		&lt;br /&gt;
			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Encapsulation is also possible in older, non-object-oriented languages. In C, for example, a structure can be declared in the public API (i.e., the header file) for a set of functions that operate on an item of data containing data members that are not accessible to clients of the API:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
// Header file &amp;quot;api.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
struct Entity;          // Opaque structure with hidden members&lt;br /&gt;
&lt;br /&gt;
// API functions that operate on 'Entity' objects&lt;br /&gt;
extern struct Entity *  open_entity(int id);&lt;br /&gt;
extern int              process_entity(struct Entity *info);&lt;br /&gt;
extern void             close_entity(struct Entity *info);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Clients call the API functions to allocate, operate on, and deallocate objects of an opaque type. The contents of this type are known and accessible only to the implementation of the API functions; clients cannot directly access its contents. The source code for these functions defines the actual contents of the structure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
// Implementation file &amp;quot;api.c&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;api.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Complete definition of the 'Entity' object&lt;br /&gt;
struct Entity {&lt;br /&gt;
    int     ent_id;         // ID number&lt;br /&gt;
    char    ent_name[20];   // Name&lt;br /&gt;
    ... and other members ...&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// API function implementations&lt;br /&gt;
struct Entity * open_entity(int id)&lt;br /&gt;
{ ... }&lt;br /&gt;
&lt;br /&gt;
int process_entity(struct Entity *info)&lt;br /&gt;
{ ... }&lt;br /&gt;
&lt;br /&gt;
void close_entity(struct Entity *info)&lt;br /&gt;
{ ... }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
This article reuses numerous content elements from [http://en.wikipedia.org/wiki/ebXML the Wikipedia article].&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---Place all category tags here--&amp;gt;&lt;br /&gt;
[[Category:Software and hardware terms]]&lt;/div&gt;</summary>
		<author><name>Shawndouglas</name></author>
	</entry>
</feed>