... As result, the function will become unusable.... For more info, see the Programmer’s Guide.... Figure 7.... Programmer’s Guide shows, diagram on the left: one more way to hide a routine.... Using this approach, the RadioBuffer class is publicly available..... The example of hiding a routine is shown on the right.... The diagram shows the original format.... In the main program there is a call to RadioBuffer::Init... When the function is invoked, the routine written in C is called.... It is hidden inside RadioBuffer::Init... After the routine is hidden, the main program continues normally.... Note: you can change the default method of hiding the function to make it more flexible.... However, the method shown in the example is recommended.... Because the method of hiding the routine with a different calling convention (the CPP API) has a number of restrictions.... However, in this case you can call the original hidden routine using CPP API..... In this case, you can hide all the functions of a class by using the same class library..... But in this case, you must also use the same calling convention to call the hidden routine..... Note: this method has many restrictions, and some classes are difficult to hide.... This method is not recommended for most users.... There is a special class, named SystemPort, that has its own private constructor.... When you call this constructor, a global variable is created.... In this case, the variable is created in a separate program space and is invisible to the program that calls the constructor..... Note: the constructor is created before the main program and is hidden inside the constructor of another class, the class InjectedSystemPort..... You can call the constructor of SystemPort by calling the private constructor of InjectedSystemPort.... The constructor of InjectedSystemPort has a number of restrictions.... The constructor of InjectedSystemPort cannot call an arbitrary function in an arbitrary program space..... The constructor of SystemPort can not call any function in the main program because its class has the most privileges..... The constructor of SystemPort has many restrictions,
Related links:
Commentaires