By Yazy - 2005, 04.21
The core of the high-level face object is: By having a documented code, an object is generated, the object is completely consistent with the definition of the source code. Such a capability of creating objects reduces the complexity of component multiplexing. ("Advanced" I used here refers to "" Runtime Features ").
For example, a class using C language: class widget {private: int _Number; string _name; public: widget (int number, const string & name): _Number (Number), _name (name) {}
INT getNumber () {return_number;
Const string & getname () {return _name;}}; if you publish it as binary components (such as DLL), then you must know that the Widget class can be done by this binary component. That is, if you want to multiplexes an object in a binary component (such as a DLL), we must clearly know the original structure of the object. If it is a C language, we can use the C / C header file to describe the structure of the type of DLL file, with the header file and the DLL file to create an object in the new C source code.
But the header file is always part of the C source program, and it is still very cumbersome for the object of creating types. What is important is whether this multiplexed binary component is still static, that is, when the source code is completed.
Advanced object-oriented more hopes that when the program is run, you can create a type in a binary component. This creation process does not require an additional device or it is best not to participate in the participation of third-party tools, more no need to "head file" This is invisible.
The abstract data type of C has no way to describe it, and its semantics requires its declaration code to describe, and these descriptions are only valid in the source code, after the source code is added, the semantics of its abstract data types do not have multiple. So use the type of DLL file in the new C source code, you must use the header file to attach this type of statement, so you can create an instance of the type.
So "the object-oriented characteristics of C are only valid during the period." The reason is that C Class Class has no way to describe it. This self-description feature requires an example of the class to be recognized in a semantic, ie the runtime code can master all the information of the class of the object via an object or thereof, ie "What kind of" Created "(this is not" an instance of the type "created by binary components").
Semantic information in COM is described by interface definition language, and these descriptions are attached to the DLL file or other shared areas (such as registry) when the program is completed, and we can create an instance of the DLL type. The .NET runtime uses "meta data" to describe this information. These description information is equivalent to one of the following declarations, which can be used to describe the semantics of Widget in a DLL: Class Widget {Private: INT _NUMBER; String_String; Public: Widget (int, const string&; int getNumber (); Const string & getname ();}; NET "metadata" also supports the type identification of runtime objects, I don't know if COM, DCOM, COM support, or other standards, such as CORBAR, SOM support? Have to learn ...