Extended C interface attributes

One big problem about C interfaces on MS Windows is that Microsoft uses the non-standard STDCALL interface almost everywhere, and also uses dll import and export attributes. Standard-conforming platforms use attributes as well. Unfortunately, the poor design of ISO-C's #pragma resulted in the use of a non-standard attribute syntax by most compilers. C99 now defines a more useful Pragma() syntax.
ISO-C-Binding already uses some C99 types, so I think it makes sense to support attributes that follow the C99 Pragma syntax. Given that most C compilers don't use the new Pragma syntax yet, it may be worth supporting a corresponding attribute syntax as an extension for the near future.
What I am proposing is to add arguments to the BIND() syntax, like:
BIND(C,name="func",attributes="__stdcall")
This is not a big issue for anyone but Windows developers, which I am guessing applies to very few of the Fortran Standards people. The reason I think it is important is because it is one of the few places where Fortran Standards have not replaced the need for non-standard statements like !DEC$ and other comment-embedded hacks.

Hi Prashanth,
In BDB XML, C#/.NET is not supported internally but is available from http://www.janabiz.com/products/e-index.html
Jason
Oracle Berkeley DB XML

Similar Messages

  • Error while extending two interfaces.

    I am using Weblogic Integration 8.5. When an interface extends two interfaces. Out of which one has a clone method declared. <br>
    This IDE is giving error as <br>
    ERROR: Sample.java:3: This type inherits two versions of method java.lang.Object clone(), one from java.lang.Object and another from com.ParentOne, that have conflicting access restrictions. <br>
    <b>Following are code snippets.</b><br>
    public interface Sample extends ParentOne, ParentTwo {} <br>
    public interface ParentOne { <br>
    public Object clone() throws CloneNotSupportedException; <br>} <br>public interface ParentTwo {} <br>
    <b>Same is working fine in other IDE with the bea JDK as well as sun's jdk. </b>
    <br>
    Can anyone help on this? Many Thanks.

    I am using Weblogic Integration 8.5. When an interface extends two interfaces. Out of which one has a clone method declared. <br>
    This IDE is giving error as <br>
    ERROR: Sample.java:3: This type inherits two versions of method java.lang.Object clone(), one from java.lang.Object and another from com.ParentOne, that have conflicting access restrictions. <br>
    <b>Following are code snippets.</b><br>
    public interface Sample extends ParentOne, ParentTwo {} <br>
    public interface ParentOne { <br>
    public Object clone() throws CloneNotSupportedException; <br>} <br>public interface ParentTwo {} <br>
    <b>Same is working fine in other IDE with the bea JDK as well as sun's jdk. </b>
    <br>
    Can anyone help on this? Many Thanks.

  • ABAP-OO: Another Layer (1 Interface) vs. extending N Interfaces?

    Hello,
    this is a crosspost from Stackoverflow, any advice greatly appreciated.
    I have an Data-Access Layer (SAP ABAP, but the language does not matter here) where I have 1 interface per entity/database-table, like
    IF_DATA_CONTRACT_HEAD->get_contract_header( )
    IF_DATA_OBJECT_CALC->get_object_calculations( )
    40 more ...
    These interfaces are implemented by the actual database-access class-impls and a generated caching-layer, which is pretty simple since the methods really do not have any parameters and just return "the relevant" data.In certain consumers however, I require a filtered access to the returned data, specifically I need to get the data of all interfaces (~50) constrained by contract-position.So, do you recommend to
    A) extend all interfaces by an optional parameter like IF_DATA_CONTRACT_POSITION-&gt;get_contract_positions() which means my impl and my caching-layer gets more complex
    B) should I create another interface IF_DATA_FILTER_CONTRACT_POSITION->set_contract_position_filter? for the sole purpose of explicitly filtering data-acesss
    A) When extending every existing interface (the ~40-50 listed above) with the optional contract-position filter/constraint, the API is quite clean and would look like the following:
    result = lo_data_object_calc->get_object_calculations( <FILTER> ).
    As already mentioned, it would require me to extend every implementation, the data-access as well as the generated caching-layer.
    B) With the explicit filter-interface IF_DATA_FILTER_CONTRACT_POSITION on the other hand, I would have yet another interface-layer around data-access and I could generate the uncoupled filtering impls. I would neither need to touch the actual data-access impl nor the generated cache-layer. However, the usage would be a little more clumsy, like
    TRY. " down-cast from data-interface to filter-interface
    DATA lo_object_filter ?= lo_data_object_calc.
    lo_object_filter->set_contract_position_filter( <FILTER> ).
    CATCH could_not_cast.
    RAISE i-need-a-filter-impl!
    ENDTRY.
    result = lo_data_object_calc->get_object_calculations( ).

    Update 05.08.2014: I decided to go with
    C) create a seperate filter-object which explicitly filters the tables retrieved by e.g. get_object_calculations( ).
    Reasoning: Separation of Concerns, explicit semantic of filtering, no need to update all interfaces or regenerate caching-layer.

  • Interface extends another interface

    Hi,
    Java has the concept of inheritance for both classes and interfaces.
    For classes inheritance is restricted to single inheritance. For multiple
    inheritance the class should implement an interface.
    But what about interfaces? Is multiple inheritance defined for interfaces?
    If so, is there any documentation on this? Are there OO-design-considerations
    that argue against multiple inheritance for interfaces?
    Thanks for your remark or pointing to literature,
    Sponiza

    You should try it and see. But, not to spoil the surprise, yes Java allows an interface to extend multiple interfaces, and yes, like most everything else there are design considerations to doing this. You might wade through the long discussion here:
    http://forum.java.sun.com/thread.jsp?thread=479908&forum=4&message=2241590
    and hit google or search these fora
    Good Luck
    Lee

  • Interfaces that extend other interfaces

    I am trying to get a handle on the concept of interfaces extending other interfaces, and I just want to bounce my thoughts off the board and see where it goes. The Sun tutorial doesn't provide a lot of detail that I can see.
    Suppose we have interface A which has 3 methods (signatures), and interface B which extends interface A and adds two methods of its own. Suppose also we have a class C which can implement A or B or both.
    1. Having B extend A provides a heirarchy of types, with A above B
    2. If class C implements interface B, then the extends relationship B has with A forces C to provide implementations for the methods of A as well as B. On this point I am not certain.
    3. Having B extend A allows us to essentially add methods to the interface defined by A without forcing those changes on owners of the classes that already extend A.
    Sound OK? Anywone have anything to add?
    Edited by: Fguy on Aug 27, 2009 7:07 PM

    jverd wrote:
    Fguy wrote:
    >
    3. Having B extend A allows us to essentially add methods to the interface defined by A without forcing those >>changes on owners of the classes that already extend A.Huh? Not sure what you're saying, here, but extending A means we're defining a type that's a specialized or >enhanced type of A. Implementors can implement A if all they need is a run of the mill A, or B if they need the >specialized/enhanced version.Thanks.
    What I meant was that class C implements interface A, and interface B is not a part of the picture yet. Then, by creating a new interface B that extends A, rather than just adding the new methods to A, then you are not forced to add new method implementation to class C right away.That would be one situation in which one might do that. Of course, it's also not uncommon to design the two distinct interfaces from the start
    Ok I'll pick up on that, the situation that led to this thread was me trying to understand why the List interface extends the Collection interface, and why the ArrayList class implements both interfaces. And I eventually decided that designing kind of an arrangement makes sense from the start as you say, because there are probably reasons why you'd want that type heirarchy, or higher level abstraction. with different levels of functionality in the respective implementations. I can't really think of any other reason.

  • Interface extending another interface

    Hi, i seem to have trouble finding on the internet what happends when one interface extends another interface. Can you explain it here or give me some link where i can find such information. Thanks

    have you tried to create on yet?  sometimes the best way to learn is just to do it.
    the truth is, extension of an interface is no different than the extension of a regular class.  when you finally implement your subClassed interface, you will just have to remember to add all unImplemented methods of both interfaces.  generally for soemthing like this its best to just implement multiple interfaces so that you will always know what you need to implement before run time otherwise you are bound to receive a lot of errors for not having implemented those methods.

  • Extending VOs with attributes and creating new treetable columns

    Hi,
    I am relatively new to the ADF scene so please bear with if what I have in my mind is not even possible with ADF. I have searched hi and lo for a solution and now I thoughts it time to ask the community.
    Anyways this is what I want to do. I have a simple DB Table that has a hierarchy i.e Trees with roots much like the Employee hierarchy. Except this table has ids for items that come from external systems ( via Web Services in my case ) and / or ids to items in a table that resides in the local schema. So basically this structure table of mine only has relationships and the detail items need to be joined via an association ( in ADF terminology ) in the treetable component somehow.
    * Now creating the structure hierarchy is not a big issue. I have that part done already.
    * I have the VO from WS ready that gets the items that I might need to show as detail columns in the tree table.
    * Querying the local item Detail VO for detail rows might also be not that problematic.
    * Merging the above 2 columns to create a consolidated row set is also not that challenging whereby each column header is premapped to internal and external fields. This mapping is configurable to add more fields as required by a user to the treetable.
    What I am struggling with is that when I have this merged row set, how will I make it appear on the UI. The treetable seems to utterly not support this i.e. adding new columns at runtime. Following is what I have been able to establish till now.
    * The addDynamicAttribute methods on the View Object are not meant for this purpose. While they do add the attributes and you can set and get them after using this method, they do not render and I can't find a way to dynmically rendering them somehow for tree table.
    * Looked at the ADF dynamic components. They support only table and page. No go. Or do the whole tree thing somehow in the table component, Will look odd but might still work.
    * Looked at this article ( http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html ) . I found a comment in the forum regarding this that this might not be all that efficient. Not to mention the fact that it uses the deprecated TreeModels class in 11g.
    ** Just regarding this apporach what are the new 11g recommended TreeModel classes to be used instead of the deprecated one. I have read the follow-up post but that just points to the location of where the deprecated classes moved to in 11g under the apache contribution. And makes the example work under 11g. What was this TreeModel class replaced with. Anyone knows ?
    ** How could I access my VO objects in the TreeTableApater ? Can I declare my merged View object wrapped in a TreeItem POJO object. Theoretically it is on the view layer right ?
    ** If this approach is inefficient has anyone another solution that might work ?
    Or just has anyone managed to extend the treetable in any different sort of way. Any tips/help pointers would be deeply appreciated.
    Best Regards,

    Hi,
    So I had some time to look at this problem again. I created a ChildPropertyTreeModel and binded it to my treetable component and moved the generation of the columns to the jspx page. I got it mostly working but the columns generation part mostly escapes me still.
    here is how the jspx page looks like that renders the treetable, and which works fine :
    <af:treeTable rowBandingInterval="0" id="dynTTbl" var="row" expandAllEnabled="true"
    binding="#{backingBeanScope.DynamicTreeTableBB.dynamicTreeTable}"
    value="#{backingBeanScope.DynamicTreeTableModel}">
    <f:facet name="nodeStamp">
    <af:column sortable="false" headerText="Node Stamp" id="c1">
    <af:outputText value="#{row.tableColumnVal[0]}" id="ot1"/>
    </af:column>
    </f:facet>
    <af:forEach begin="1" end="2" varStatus="status">
    <af:column>
    <f:facet name="header">
    <af:outputText value="#{status.index}"/>
    </f:facet>
    <af:inputText value="#{row.tableColumnVal[status.index]}"/>
    </af:column>
    </af:forEach>
    </af:treeTable>
    I want the forEach loop to look a bit differently like below :
    <af:forEach items="row.tableColumnVal" var="columnVal" varStatus="status">
    <af:column>
    <f:facet name="header">
    <af:outputText value="#{status.index}"/>
    </f:facet>
    <af:inputText value="#{columnVal}"/>
    </af:column>
    </af:forEach>
    This should work for a list or array but evidently in my case it is not. I have a suspicion that the "items" attribute is unable to recognize the row.tableColumnVal attribute of mine. I have no way of checking this out or finding out if I am doing something wrong.
    My sample project can be found here, if anyone quickly wants to run this on Jdev 11g
    http://rapidshare.com/files/438880281/TreeTableTest.zip
    P.S. I have tried to convert the tableColumnVal attribute to a List an array and a Map. The first forEach syntax works everytime but the second one fails always and I want the second one to work somehow.
    Regards,

  • Internal class implementing interface extending abstract interface :P

    Confused ha? Yeah me too. RIght here it goes.
    Theres an abstract interface (abstractIFace) that has for example method1() method2() and method3(). There are two other interfaces iFace1 and iFace2 that extend abstractIFace. Still with me? :P iFace1 only uses method2() whereas iFace2 uses method1(), method2() and method3(). Internal classes implementing these are then used. The reason is so that when returning an object one method can be used that will return different types of objects. But this doesnt work. It says that all the classes in the abstractIFace must be used/implemented but I only want method2() in iFace1 and all in iFace2.
    Just say what the f*ck if this is too confusing cos i think it is and i did a crap job explaining!! :P

    public interface IFace {
        void method1();
        void method2();
        void method3();
    public class Test {
        private static class Class1 implements IFace {
            public void method1() {
                System.out.println("method1");
            public void method2() {
                System.out.println("method2");
            public void method3() {
                System.out.println("method3");
        private static class Class2 implements IFace {
            public void method1() {
                throw new UnsupportedOperationException();
            public void method2() {
                System.out.println("method2");
            public void method3() {
                throw new UnsupportedOperationException();
        public static IFace createObject(boolean flag) {
            return flag ? (IFace) new Class1() : new Class2();
    }

  • About extending parameterized interfaces...

    Hi all,
    I have a (hopefully?) quick question about generics. I have the following interface:
    public interface MessageHandler<T extends Message, S extends NodeInterface> extends Handler {
         public Class<T> getHandledClass();
         public void nowHandle(S ni, T msg);
    }Now, I have a whole family of classes that are going to implement this interface, such as the following:
    public class LivenessReplyHandler implements MessageHandler<LivenessReply, PardooNodeInterface> {
    public class LivenessRequestHandler implements MessageHandler<LivenessRequest, PardooNodeInterface> {
    }etc. In each case, the right hand type is always PardooNodeInterface. Now since this is a family of classes, I'd like to do something more along these lines:
    public interface PardooMessageHandler<T extends Message> extends MessageHandler {
         public void nowHandle(PardooNodeInterface ni, T msg);
    }And then clients simply extend PardooMessageHandler:
    public class LivenessReplyHandler implements PardooMessageHandler<LivenessReply> {
    public class LivenessRequestHandler implements PardooMessageHandler<LivenessRequest> {
    }That is, extending from PardooMessageHandler automatically implies that type S in nowHandle of MessageHandler is of type PardooNodeInterface. Now you may ask "Why don't you just go hard-code PardooNodeInterface into type S in MessageHandler then?" Well, that's because this is just one family of handlers -- in the end, there will probably be a half-dozen more, each using a different type for S.
    I feel as this can be done using generics... Just not clear on the syntax :(
    Thanks,
    shadowmatter

    I think this would work:
    public interface PardooMessageHandler<T extends Message> extends MessageHandler<T,PardooNodeInterface> {
    }

  • To access interface attributes at runtime

    Hi,
    My program contains a interface i1 in system sys1 & interface i2 in system sys2. I have to write a function in sys1 to get the attributes of either i1 or i2 based on the system , with out compilation error.
    ie) if system is sys1.
    x = i1=>attribute.
    else if system is sys2.
    x = i2=>attribute.
    endif.
    kindly help me to solve this issue with out getting compilation error.
    Thanks,
    Jey

    Hi Jey,
                 You can use the USING and CHANGING to get the value without compilation error.
    Regards,
    Sayak...

  • Interface, Attribute and visibility

    Dear all,
    how can I make my attributes protected or privat in an interface. The class setting up the interface has then the getter and setter methods for the attributes (even the interface has the methods too).
    Kind regards
    Roman

    Hi Roman,
    An interface should not be pictured as a template, but more as a communication channel for different objects with common characteristics. If you want a template to create other classes, with private/protected attributes, and methods, I recommend that you use an abstract class. An abstract class will allow you to declare attributes and methods without code. Of course, you cannot instantiate an abstract class; you have to create another class that inherits from it.
    Cheers,
    Luc

  • Payables Interface Attribute Values

    We are upgrading to R12 from R11. Currently in R11, we populate the AP_INVOICE_DISTRIBUTIONS_ALL table with DFF values (attributes). These DFF values are flowing through to Projects, which is what we need. (The DFF values are the external system PO numbers, work order numbers, etc.)
    In R12, the Payables Interface populates the DFF in the "AP_INVOICE_LINES_ALL" table. This data is not flowing into the AP_INVOICE_DISTRIBUTIONS_ALL table. Since it is the Distributions table that ultimately flows into Projects. the DFF data is not getting into Projects.
    We need the DFF values to flow from the Payables import interface through Payables and into Projects.
    Is there a way to link the DFF (attributes) on the AP_INVOICE_LINES_ALL table to the AP_INVOICE_DISTRIBUTIONS_ALL? Or, is there another way to get it from the AP Interface and into Projects?
    Thanks in advance for your help.

    so you are importing the invoices correct ?
    If so, then there is a new profile option in R12:
    AP: Copy Invoice Lines Flexfield to Distributions during Import
    Try setting this

  • Extending the Interface

    Suppose I create the following interface
    package com.foo;
    import javax.swing.ListModel;
    public interface MyInterface extends ListModel
         public void bar();
    }MyInterface then can be said to enforce the contract of "ListModel".
    So when I use it for my GUI, it works.
    MyInterface myint = new MyInterfaceImpl();
    JList list = new JList();
    list.setModel(myint);I understand that ComboBoxModel extends from ListModel. Given this, I use it for the interface
    hoping to be able to use the implementation of the interface for the model of both JList and JComboBox.
    public interface MyInterface extends ComboBoxModel
         public void bar();
    MyInterface myint = new MyInterfaceImpl();
    JComboBox box = new JComboBox();
    box.setModel(myint);But I generate errors not only when I attempt to apply the updated interface to the model of the JList, but also when I apply it to the model of the JComboBox. But why? If the interface ComboBoxModel extends from the interface ListModel, why do problems arise?

    Just to update...
    I've managed to create a model that satisifies the model for both JList and JComboBox by using a class that extends DefaultComboBoxModel rather than extending the class DefaultListModel.
    And I'm currently reviewing another thread relevant to the subject here..
    http://forum.java.sun.com/thread.jsp?forum=54&thread=519806
    I understand that the interface defines an "is a" relationship between the implementation and the interface (ie ArrayList is a List etc..) So I might assume that it is the same to say that a ComboBoxModel is a ListModel, though this relationship is one of extension. javax.swing.ComboBoxModel extends javax.swing.ListModel. But I am confused as to why the increased specificity would cause the code to generate errors. Surely I am not taking away from the interface..If the interface extends from a subclass of ListModel, doesn't it continue to extend from ListModel?
    The error message when I extend from CombBoxModel rather than ListModel is something like ...
    setModel(javax.swing.ListModel) in javax.swing.JList cannot be applied to com.foo.MyInterface
    Thanks

  • Extending portal role attributes.

    Hi experts,
    I have previously extended the UME, speaking in terms of user details, adding extra fields.. (i.e. customer number).
    My question is now oriented to roles, can we extened the IRole object adding extra fields?
    Does this work the same way as extending user details? say... create metadata properties, add properties to structure, map properties to UME Principals, and so on.. have anyone done that before? Maybe the role could have a "Customized Information" tab as the extended fields in a portal user.
    I need some extrafields to the portal's Role object, and access this fields through the security API in webdynpro java. In example, we would extend the Role's attributes having a fields for Functional / Technical role.
    Any comments will be apreciated..
    Thanx in advance..
    JV

    Come on Gurus.
    Somebody must know how to do this. Is it not a common requirement to enhance master data.
    Any help very much appreciated
    Regards
    HKF

  • Class extends two interface which have method in common name

    A class implements two interfaces. Those interfaces have method in common name.
    For ex;
    public interface b{public void hello();}
    public interface c{public void hello();}
    public class a implements b,c
    public void hello(){}
    Since two interfaces have common method, How to differentiate in this case ?

    How to differentiate what? You have to provide a method called hello(), just as in your example. (Normally you would have code in the method body, but zero lines of code is not against the rules.)

Maybe you are looking for

  • IPhone 4 Recovery Mode Loop PLEASE HELP ASAP

    My iPhone 4 is stuck in a Recovery mode loop ever since I updated to iOS 6. I am using a mac running 10.8.3 with the latest iTunes. When it is connected to my computer iTunes pops up and says "An iPhone in recovery mode has been connected, you must r

  • User in secutity filtering but not in OU?

    If user is in security filtering of the GPO but not in the OU where GPO is applied will GPO be applied to that user?

  • ISE 1.1.3 Guest portal (Web redirection) what worked for me !!!

    Hello, this document lead to multiple failure !!!! http://www.cisco.com/en/US/products/ps11640/products_configuration_example09186a0080ba6514.shtml This guy really helps !!! https://www.youtube.com/watch?v=TW2ZJVIZ8bs See attached screen captures. IS

  • Macbook running incredibly slow - Etre Info - Please Help!

    My Macbook has been running slow for quite sometime, and regardless of my internet provider, it is deathly slow to load.  I have seen individuals post the Etre info, so I thought I would do the same.  Not sure if this will help, but here's hoping!  I

  • Black line on the left margin when printing

    The printing functionality for a coloring book app working great in AS2. After porting to AS3 users get a black border on the left side of the page. Have anyone had this problem or know of any solutions? Thanks in advance for your time.