Sto leggendo Laboratorio UML in tempo reale per sistemi embedded e non capisco cosa stanno dicendo qui . Ho evidenziato in grassetto le parti del testo che non comprendo completamente. Sto cercando di capirlo dal punto di vista del punto C.
An interface is a named collection of services. Services come in two basic flavors. Operations are synchronous services that are invoked, or called by clients. Event receptions are asynchronous services that are invoked by sending an asynchronous signal to the object accepting that event. An interface can contain either or both operations and event receptions. Both operations and event signals can contain data, called parameters, passed with the invocation. The set of parameters, along with the name of the service, is called the signature of the service. A class that is compliant with an interface provides a method for every operation and an event reception for every signal specified in the interface.
Interfaces allow you to separate the specification of services that may be called on a class from the implementation of those services. A class defines methods (for operations) and event receptions (for signals, specified on the state machine). Both methods and event receptions include the lines of code that implement the service. An operation or signal is a specification only, and does not include such implementation detail.
Interfaces may not have implementation (either attributes or methods) and are not directly instantiable. A class is said to realize an interface if it provides a method for every operation specified in the interface, and those methods have the same names, parameters, return values, preconditions, and postconditions of the corresponding operations in the interface.
Che cos'è un esempio (o due!) di implementazione di un'interfaccia in C?
Da quello che sembra, è solo un prototipo di funzioni specifiche nel file di intestazione.
Ho rimosso UML e aggiunto l'interfaccia e il design orientato agli oggetti perché penso che la domanda gira attorno a questi argomenti piuttosto che su UML