Encapsulation (computer programming): Difference between revisions

Content deleted Content added
m An information-hiding mechanism: corrected compile error in C# by adding m at the end of decimal number
Line 137:
extern int process_entity(struct Entity *info);
extern void close_entity(struct Entity *info);
// extern keywords here are redundant, but they won't hurt.
// extern define functions to have external linkage (i.e. can be called outside current file)
// which is the default even without the keyword extern<ref>King, Kim N. C programming: a modern approach. WW Norton & Company, 2008.</ref>
</source>
Clients call the API functions to allocate, operate on, and deallocate objects of an [[opaque data 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: