interface

interface hunt for something like Appendable or OutputStream

Hmmm. I'm trying to write a class that accepts bytes, and would like to implement a well-known interface for this purpose. java.io.OutputStream is an abstract class, not an interface (why???) and that makes me nervous, as I don't know what the consequences are of extending it. If there are no consequences, it should have been an interfa...

C# Generic Partial Classes, interfaces, AND inheritance, all in the same question! (oh my!)

I've been working on a code generater for my projects and, while all has worked well. But now, I've stumbled upon a detail that I'm not sure how to resolve. This is for my DAL layer, which is intended to allow implementations for diferente dataSources. so I've got an interface: public interface IUsersDALBase { //defined methods } ...

Save div height in a cookie from jQuery resizable

Hi, I am using jQuery resizable from interface.eyecon.ro/docs/resizable for a menu on a page that I am working on. I need to set a cookie ( plugins.jquery.com/project/Cookie ) to store the height of the menu div so that the div doesn't resize to it's original css height on every page reload. I've been trying to adapt the code from http...

Adding a set accessor to a property in a class that derives from an abstract class with only a get accessor

I have an abstract class, AbsClass that implements an interface, IClass. IClass has a couple properties with only Get accessors. AbsClass implements the properties of IClass as abstract properties to be defined in the classes that derive from AbsClass. So all of the classes that derive from AbsClass will also need to satisfy IClass by ...

Why properties are not declarables in interfaces

In Actionscript 3 I can't declare vars in Interfaces. I don't get it. I know i can work this around by defining getters and setters, but what if i just want a simple public property? I usually use getters and setters if there is something to do when i set or get a property, but what if i just want to store a value? ...

ASP.NET System.Web.Abstractions why were they created as an abstract Base class?

As above really, I'm wondering why Microsoft released the abstractions as abstract classes instead of interfaces? I would be interested in any insights because I need to do something similar for standard things like System.IO features for File and Directory, however I feel that an interface would feel nicer? There must be a good reaso...

Interfaces in a relational UML diagram inspired by SO

I have developed my homework from the post. Problem: to do posts similarly as in SO so that the first post is the question and the other posts are replies after the question. Question: How would you improve the interfaces? Would some simpler data structure make things easier? ...

Objective-C @interface/pointer clarification.

Learning as always, was going along quite nicely, until I realized I had no idea what the differences meant between these. @class Player; @class Map; @interface View : NSView { Player* player_; Map* currentMap_; NSMutableArray *worldArray; NSMutableArray *itemArray; float cellHeight_; } @end Never mind, turns out...

Winforms UserControl is not using the inheritance tree I have created. What am I doing wrong.

Hello, I am working on a wizard form framework that will allow me easily create wizard forms. I have a WizardForm form that has a panel on it. My plan is to dynamically load UserControls into this panel on the form. Each UserControl that is loaded onto the form panel must implement certain properties (allowNavigateNext, AllowNAvigat...

EJB3 - Session Bean calling method of another bean interface

I have a little question... I search the difference in local access between accessing a method that is only declared in the remote interface of a bean and not in the local interface... does the interface declaration (remote or local) determine the access protocol of the method? or does the ejb container understand that both beans are ru...

Same interface in different domains/project

I got this issue: Product class in a SQLBackend that implements IProduct interface. I also got a Product in SAPBackend (ERP, accounting software) that implements the same IProduct. Both backend is in a different project. I want to be able to use pass a Product between this two project so I need the same common interface. I was thin...

Is a switch statement applicable in a factory method? c#

I want to return an Interface and inside a switch statement I would like to set it. Is this a bad design? private IResultEntity GetEntity(char? someType) { IResultEntity entity = null; switch (someType) { case 'L': //life entity = new LifeEntity(); break; ...

Best way to use a C++ Interface

I have an interface class similar to: class IInterface { public: virtual ~IInterface() {} virtual methodA() = 0; virtual methodB() = 0; }; I then implement the interface: class AImplementation : public IInterface { // etc... implementation here } When I use the interface in an application is it better to create ...

Interface usb to 89s52 ( 8051 ) microcontroller

How do i interface an usb to microcntroller 89s52 ? can i get the circuit diagram itself ? And also the logic behind the transmission and reception of bits ? Thnxx ...

Is interface highest level of abstraction ?

I am confused about abstraction and encapsulation.What i feel is that class is encapsulation as it encapsulates data and behaviour,while interface is abstraction.Please comment ...

Terminology: Difference between software interface, software component, software unit, software module

I see these terms used quite a lot between various authors, but I can't seem to fix upon definitive definitions. From my POV a software interface is a "type" specifying the way in which a software component may be used by other softare components. But what exactly a software component is I'm not entirely sure (and it seems no-one else...

Interfaces and Generics

I have problems to get generics to work in the following scenario: Delphi provides the interface IComparable: IComparable <T> = interface function CompareTo (Value : T) : Integer; end; I add another interface IPersistent: IPersistent = interface function ToString : String; procedure FromString (const Str : String); end; One...

Force Singleton Pattern on a Class implementing an Interface.

I better explain the question with an example. I have an Interface Model which can be used to access data. There can be different implementations of Model which can represent the data in various format say XMl , txt format etc. Model is not concerned with the formats. Lets say one such implementation is myxmlModel. Now i want to force m...

What is the most efficient way in XCode to add a delegate's or protocol's methods to the .m file?

When one Implements an Interface (equivalent to a Protocol in Objective-C) in the .Net environment, the IDE automatically adds the properties and methods that need to be implemented to the class' file. Is there a setting that will result in a similar behavior in the Xcode environment? Will it do the same for a delegate? At this point,...

How can I return List<MyInterface> in this scenario

Let me start by saying I'm pretty new to using interfaces. I'm writing a method (GetClaimDetails) that will return information about a medical insurance claim. If it is claim type A, it will return an list of the ClaimDetailA class. If claim type B, return list of ClaimDetailB class. Both of these classes share common properties but eac...