Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 23, 2013, 09:08:55 pm
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5386
Members
Latest Member:
Salamutuu
Crystal Space
Crystal Space Development
Support
What is the real meaning of 'interface' in CS?
« previous
next »
Pages:
[
1
]
Author
Topic: What is the real meaning of 'interface' in CS? (Read 2117 times)
Jr. Member
Posts: 81
What is the real meaning of 'interface' in CS?
«
on:
October 14, 2007, 04:59:41 am »
I am very in CS.
For a long time i am confused with the meaning of 'interface' in CS. Is it a visual class ? Or it has the same meaning of 'interface' in Java?
can you tell me the real meaning of 'interface' in CS? Thank you very much!
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: What is the real meaning of 'interface' in CS?
«
Reply #1 on:
October 14, 2007, 05:50:59 am »
An interface has both a conceptual meaning and (in Crystal Space) a technical meaning. On a conceptual level an interface represents a contract between two parties. It defines how one party (for example an application using CS) can use functionality in another party (for example a plugin in CS). The interface is the only way to use the functionality in that plugin. The set of interfaces included with CS form the API of CS and define how you can use CS.
On a technical level an interface is represented by a pure virtual abstract class in C++. That means a class where every function is declared as pure virtual (like 'virtual void Function () = 0'). This means you can only see the declaration of that class but not the implementation. The implementation is private to the plugin and you're not supposed to know what it is (black box model).
And yes, interfaces in java are similar. The big difference is that Java has a language construct to define interfaces and in C++ we have to simulate it using pure virtual abstract classes.
Hope this helps,
Greetings,
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...