Method (data-processing)
See also: Method
In directed programming object
In directed Programming object, the method is a function belonging to the Interface of a object. In this case, the methods are also called methods of authority and act only on one object at the same time. Other methods, called methods of class or static methods , make it possible to act on all the objects of the same class.In many languages, the encapsulation makes it possible to manage the rights of access with a method or a data member. One rather often uses (as in C++ or Java for example) the key words public , private or protected to manage these rights of access. The public methods are the methods accessible from the outside of the object. In theory, the use of the public methods (and thus of its interface) of an object is the only means to reach (indirectly) the state of the object. But, certain languages give access directly the state of an object or part of this state by the modification of the constraints of access to the data of the object.
There exist various types of méthodes :
-
it (S) manufacturer (S) called (S) with the creation of the object, is:
- manufacturer by defect called by defect at the time of creation of object, (offered by defect during compilation if there is no declared manufacturer),
- the manufacturer by recopy called during the creation of the object, of the passage of an object by reference,
- it (S) manufacturer (S) parametric called (S) if the signature corresponds has that of the manufacturer,
- the destroying called with the removal of the object,
- the abstract methods which is methods without code, their existence in a class is enough to declare that a class is abstract,
- the accesseurs (Get) and the manipulators (Set) .
- the accesseurs make it possible to recover the value of data members deprived without reaching it directly of outside,
- the manipulators make it possible to change the state of data members by checking if the value that one wants to give to the data member respects the standards of this one.
In the field of the networks
An access method in a lan is the whole of the rules which will make it possible the machines to share the support.
| Random links: | District of Loretteville (Quebec) | Eskilstuna | Dja | Cambiano | Variety closely connected | Bourgeon_Powell |