Search Results

Search found 2051 results on 83 pages for 'abstract'.

Page 6/83 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Pure virtual or abstract, what's in a name?

    - by Steven Jeuris
    While discussing a question about virtual functions on Stack Overflow, I wondered whether there was any official naming for pure (abstract) and non-pure virtual functions. I always relied on wikipedia for my information, which states that pure and non-pure virtual functions are the general term. Unfortunately, the article doesn't back it up with a origin or references. To quote Jon Skeet's answer to my reply that pure and non-pure are the general term used: @Steven: Hmm... possibly, but I've only ever seen it in the context of C++ before. I suspect anyone talking about them is likely to have a C++ background :) Did the terms originate from C++, or were they first defined or implemented in a earlier language, and are they the 'official' scientific terms?

    Read the article

  • Absent Code attribute in method that is not native or abstract

    - by kerry
    I got the following, quite puzzling error today when running a unit test: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/http/Cookie A google search found this post, which explains that it is caused by having an interface in the classpath, and not an actual implementation. In this case it’s the java-ee interface. To fix this I added the jetty servlet api implementation to my pom: jetty javax.servlet test Piece of cake. I have run in to this before, so I figured I would capture the fix here in case I run in to it again.

    Read the article

  • Abstract Data Type and Data Structure

    - by mark075
    It's quite difficult for me to understand these terms. I searched on google and read a little on Wikipedia but I'm still not sure. I've determined so far that: Abstract Data Type is a definition of new type, describes its properties and operations. Data Structure is an implementation of ADT. Many ADT can be implemented as the same Data Structure. If I think right, array as ADT means a collection of elements and as Data Structure, how it's stored in a memory. Stack is ADT with push, pop operations, but can we say about stack data structure if I mean I used stack implemented as an array in my algorithm? And why heap isn't ADT? It can be implemented as tree or an array.

    Read the article

  • How abstract should you get with BDD

    - by Newton
    I was writing some tests in Gherkin (using Cucumber/Specflow). I was wondering how abstract should I get with my tests. In order to not make this open-ended, which of the following statements is better for BDD: Given I am logged in with email [email protected] and password 12345 When I do something Then something happens as opposed to Given I am logged in as the Administrator When I do something Then something happens The reason I am confused is because 1 is more based on the behaviour (filing in email and password) and 2 is easier to process and write the tests.

    Read the article

  • Who should map physical keys to abstract keys?

    - by Paul Manta
    How do you bridge the gap between the library's low-level event system and your engine's high-level event system? (I'm not necessarily talking about key events, but also about quit events.) At the top level of my event system, I send out KeyPressedEvents, KeyRelesedEvents and others of this kind. These high-level events only contain the abstract values of the keys (they don't say that Space way pressed, but that the JumpKey was pressed, for example). Whose responsibility should it be to map the "JumpKey" to an actual key on the keyboard?

    Read the article

  • Upcoming EBS Webcasts for June, July, August 2012

    - by user793553
    See the following upcoming webcasts for June, July and August 2012. Flag Doc ID 740966.1 as a favourite, to keep up to date with latest advisor schedule. Additionally, see Doc ID 740964.1 for access to all archived advisor webcasts Oracle E-Business Suite Oracle E-Business Suite Title Date Summary None at this time.     EBS Agile Title Date Summary None at this time.     EBS Applications Technologies Group (ATG) Title Date Summary EBS – OAM Tuning and Monitoring EMEA July 10, 2012 Abstract EBS – OAM Tuning and Monitoring US July 11, 2012 Abstract Workflow Analyzer Followup EMEA July 24, 2012 Abstract Workflow Analyzer Followup US July 25, 2012 Abstract EBS CRM & Industries Title Date Summary None at this time.     EBS Financials Title Date Summary EBS Fixed Assets: Achieve Success Using Proactive Tools For Fixed Assets Support July 10, 2012 Abstract Overview and Flow of Oracle Project Resource Management July 17, 2012 Abstract Leveraging My Oracle Support To Increase Knowledge July 30, 2012 Abstract EBS HCM (HRMS) Title Date Summary Oracle Time and Labor (OTL) Rollback Functionality Session 1 July 25, 2012 Abstract Oracle Time and Labor (OTL) Rollback Functionality Session 2 July 25, 2012 Abstract EBS Manufacturing Title Date Summary Using Personalization in Oracle eAM June 21, 2012 Abstract OM Guided Resolutions - Finding Known Resolutions Easily July 17, 2012 Abstract Material Move Orders Flow July 25, 2012 Abstract Diagnosing Signal 11 Issues In ASCP Planning August 9, 2012 Abstract Interface Trip Stop - Best Practices and Debugging August 21, 2012 Abstract EBS Procurement Title Date Summary Punchout in iProcurement June 26, 2012 Abstract

    Read the article

  • Abstract skill/talent system implementation

    - by kiliki
    I've been making small 2D games for about 3 years now (XNA and more recently LWJGL/Slick2D). My latest idea would involve some form of "talent tree" system in a real time game. I've been wracking my brain but can't think of a structure to hold a talent. Something like "Your melee attack is an instant kill if behind the target" I'd like to come up with an abstract object rather than putting random conditionals into other methods. I've solved some relatively complex problems before but I don't even know where to begin with this one. Any help would be appreciated - Java, pseudocode or general concepts are all great.

    Read the article

  • How to work with PHP abstract?

    - by YumYumYum
    Why would you use such abstract? Does it speed up work or what exactly its for? // file1.php abstract class Search_Adapter_Abstract { private $ch = null; abstract private function __construct() { } abstract public funciton __destruct() { curl_close($this->ch); } abstract public function search($searchString,$offset,$count); } // file2.php include("file1.php"); class abc extends Search_Adapter_Abstract { // Will the curl_close now automatically be closed? } What is the reason of extending abstract here? Makes me confused. What can i get from it now?

    Read the article

  • Java abstract visitor - guarantueed to succeed? If so, why?

    - by disown
    I was dealing with hibernate, trying to figure out the run-time class behind proxied instances by using the visitor pattern. I then came up with an AbstractVisitable approach, but I wonder if it will always produce correct results. Consider the following code: interface Visitable { public void accept(Visitor v); } interface Visitor { public void visit(Visitable visitorHost); } abstract class AbstractVisitable implements Visitable { @Override public void accept(Visitor v) { v.visit(this); } } class ConcreteVisitable extends AbstractVisitable { public static void main(String[] args) { final Visitable visitable = new ConcreteVisitable(); final Visitable proxyVisitable = (Visitable) Proxy.newProxyInstance( Thread.currentThread().getContextClassLoader(), new Class<?>[] { Visitable.class }, new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return method.invoke(visitable, args); } }); proxyVisitable.accept(new Visitor() { @Override public void visit(Visitable visitorHost) { System.out.println(visitorHost.getClass()); } }); } } This makes a ConcreteVisitable which inherits the accept method from AbstractVisitable. In c++, I would consider this risky, since this in AbstractVisitable could be referencing to AbstractVisitable::this, and not ConcreteVisitable::this. I was worried that the code under certain circumstances would print class AbstractVisible. Yet the code above outputs class ConcreteVisitable, even though I hid the real type behind a dynamic proxy (the most difficult case I could come up with). Is the abstract visitor approach above guaranteed to work, or are there some pitfalls with this approach? What guarantees are given in Java with respect to the this pointer?

    Read the article

  • (Abstract) Game engine design

    - by lukeluke
    I am writing a simple 2D game (for mobile platforms) for the first time. From an abstract point of view, i have the main player controlled by the human, the enemies, elments that will interact with the main player, other living elements that will be controlled by a simple AI (both enemies and non-enemies). The human player will be totally controlled by the player, the other actors will be controlled by AI. So i have a class CActor and a class CActorLogic to start with. I would define a CActor subclass CHero (the main player controlled with some input device). This class will probably implement some type of listener, in order to capture input events. The other players controlled by the AI will be probably a specific subclass of CActor (a subclass per-type, obviously). This seems to be reasonable. The CActor class should have a reference to a method of CActorLogic, that we will call something like CActorLogic::Advance() or similar. Actors should have a visual representation. I would introduce a CActorRepresentation class, with a method like Render() that will draw the actor (that is, the right frame of the right animation). Where to change the animation? Well, the actor logic method Advance() should take care of checking collisions and other things. I would like to discuss the design of a game engine (actors, entities, objects, messages, input handling, visualization of object states (that is, rendering, sound output and so on)) but not from a low level point of view, but from an high level point of view, like i have described above. My question is: is there any book/on line resource that will help me organize things (using an object oriented approach)? Thanks

    Read the article

  • Help with Abstract Factory Pattern

    - by brazc0re
    I need help with a abstract factory pattern design. This question is a continuation of: Design help with parallel process I am really confused where I should be initializing all of the settings for each type of medium (ex: RS232, TCP/IP, etc). Attached is the drawing on how I am setting up the pattern: As shown, when a medium is created, each medium imposes a ICreateMedium interface. I would assume that the Create() method also create the proper object, such as SerialPort serialPort = new SerialPort("COM1", baud); however, TCPIPMedium would have an issue with the interface because it wouldn't need to initialize a serial port object. I know I am doing something majorly wrong here. I just can't figure it out and have been stuck for a while. What I also get confused on show the interface IMedium will get access to the communication object once it is created so it can write out the appropriate byte[] packet. Any guidance would be greatly appreciated. My main goal is to have the Communicator class spit a packet out without caring which type of medium is active.

    Read the article

  • Php: Overriding abstract method goes wrong

    - by Lu4
    Hi! I think there is a problem in php's OOP implementation. EDIT: Consider more illustrative example: abstract class Animal { public $name; // public function Communicate(Animal $partner) {} // Works public abstract function Communicate(Animal $partner); // Gives error } class Panda extends Animal { public function Communicate(Panda $partner) { echo "Hi {$partner->name} I'm a Panda"; } } class Human extends Animal { public function Communicate(Human $partner) { echo "Hi {$partner->name} I'm a Human"; } } $john = new Human(); $john->name = 'John'; $mary = new Human(); $mary->name = 'Mary'; $john->Communicate($mary); // should be ok $zuzi = new Panda(); $zuzi->name = 'Zuzi'; $zuzi->Communicate($john); // should give error The problem is that when Animal::Communicate is an abstract method, php tells that the following methods are illegal: "public function Communicate(Panda $partner)" "public function Communicate(Human $partner)" but when Animal::Communicate is non-abstract but has zero-implementation Php thinks that these methods are legal. So in my opinion it's not right because we are doing override in both cases, and these both cases are equal, so it seems like it's a bug... Older part of the post: Please consider the following code: Framework.php namespace A { class Component { ... } abstract class Decorator { public abstract function Decorate(\A\Component $component); } } Implementation.php namespace B { class MyComponent extends \A\Component { ... } } MyDecorator.php namespace A { class MyDecorator extends Decorator { public function Decorate(\B\MyComponent $component) { ... } } } The following code gives error in MyDecorator.php telling Fatal error: Declaration of MyDecorator::Decorate() must be compatible with that of A\Decorator::Decorate() in MyDecorator.php on line ... But when I change the Framework.php::Decorator class to the following implementation: abstract class Decorator { public function Decorate(\A\Component $component) {} } the problem disappears.

    Read the article

  • How to add member variable to an interface in c#

    - by Nassign
    I know this may be basic but I cannot seem to add a member variable to an interface. I tried inheriting the interface to an abstract class and add member variable to the abstract class but it still does not work. Here is my code: public interface IBase { void AddData(); void DeleteData(); } public abstract class AbstractBase : IBase { string ErrorMessage; abstract AddData(); abstract DeleteData(); }

    Read the article

  • Why can't create object of an abstract class?

    - by Gaurav
    Here is a scenario in my mind and I have googled, Binged it a lot but got the answer like "Abstract class has not implemented method so, we cant create the object" "The word 'Abstract' instruct the clr that not to create object of the class" But in a simple class where we have all virtual method, able to create an object??? Also, we can define different access modified to Abstract class constructor like private, protected or public. My search terminated to this question ; Why we can't create object of an Abstract class?

    Read the article

  • What is the difference between an Abstract Syntax Tree and a Concrete Syntax Tree?

    - by Jason Baker
    I've been reading a bit about how interpreters/compilers work, and one area where I'm getting confused is the difference between an AST and a CST. My understanding is that the parser makes a CST, hands it to the semantic analyzer which turns it into an AST. However, my understanding is that the semantic analyzer simply ensures that rules are followed. I don't really understand why it would actually make any changes to make it abstract rather than concrete. Is there something that I'm missing about the semantic analyzer, or is the difference between an AST and CST somewhat artificial?

    Read the article

  • Should I be using abstract methods in this Python scenario?

    - by sfjedi
    I'm not sure my approach is good design and I'm hoping I can get a tip. I'm thinking somewhere along the lines of an abstract method, but in this case I want the method to be optional. This is how I'm doing it now... from pymel.core import * class A(object): def __init__(self, *args, **kwargs): if callable(self.createDrivers): self._drivers = self.createDrivers(*args, **kwargs) select(self._drivers) class B(A): def createDrivers(self, *args, **kwargs): c1 = circle(sweep=270)[0] c2 = circle(sweep=180)[0] return c1, c2 b = B() In the above example, I'm just creating 2 circle arcs in PyMEL for Maya, but I fully intend on creating more subclasses that may or may not have a createDrivers method at all! So I want it to be optional and I'm wondering if my approach is—well, if my approach could be improved?

    Read the article

  • Java: reusable encapsulation with interface, abstract class or inner classes?

    - by HH
    I try to encapsulate. Exeption from interface, static inner class working, non-static inner class not working, cannot understand terminology: nested classes, inner classes, nested interfaces, interface-abstract-class -- sounds too Repetitive! Exception 'illegal type' from interface apparently because values being constants(?!) static interface userInfo { File startingFile=new File("."); String startingPath="dummy"; try{ startingPath=startingFile.getCanonicalPath(); }catch(Exception e){e.printStackTrace();} } Working code but no succes with non-static inner class import java.io.*; import java.util.*; public class listTest{ public interface hello{String word="hello word from Interface!";} public static class hej{ hej(){} private String hejo="hello hallo from Static class with image"; public void printHallooo(){System.out.println(hejo);} } public class nonStatic{ nonStatic(){} //HOW TO USE IT? public void printNonStatic(){System.out.println("Inside static class with an image!");} } public static void main(String[] args){ //INTERFACE TEST System.out.println(hello.word); //INNNER CLASS STATIC TEST hej h=new hej(); h.printHallooo(); //INNER CLASS NON-STATIC TEST nonStatic ns=new nonStatic(); ns.printNonStatic(); //IS there a way to it without STATIC? } } Output The above code works but how non-staticly? Output: hello word from Interface! hello hallo from Static class with image! StaticPrint without an image of the class! Related Nesting classes inner classes? interfacses

    Read the article

  • How do I access abstract private data from derived class without friend or 'getter' functions in C++?

    - by John
    So, I am caught up in a dilemma right now. How am I suppose to access a pure abstract base class private member variable from a derived class? I have heard from a friend that it is possible to access it through the base constructor, but he didn't explain. How is it possible? There are some inherited classes from base class. Is there any way to gain access to the private variables ? class Base_button { private: bool is_vis; Rect rButton; public: // Constructors Base_button(); Base_button( const Point &corner, double height, double width ); // Destructor virtual ~ Base_button(); // Accessors virtual void draw() const = 0; bool clicked( const Point &click ) const; bool is_visible() const; // Mutators virtual void show(); virtual void hide(); void move( const Point &loc ); }; class Button : public Base_button { private: Message mButton; public: // Constructors Button(); Button( const Point &corner, const string &label ); // Acessors virtual void draw() const; // Mutators virtual void show(); virtual void hide(); }; I want to be able access Rect and bool in the base class from the subclass

    Read the article

  • Implement two functions with the same name but different, non-covariant return types due to multiple abstract base classes

    - by user1508167
    If I have two abstract classes defining a pure virtual function with the same name, but different, non-covariant return types, how can I derive from these and define an implementation for both their functions? #include <iostream> class ITestA { public: virtual ~ITestA() {}; virtual float test() =0; }; class ITestB { public: virtual ~ITestB() {}; virtual bool test() =0; }; class C : public ITestA, public ITestB { public: /* Somehow implement ITestA::test and ITestB::test */ }; int main() { ITestA *a = new C(); std::cout << a->test() << std::endl; // should print a float, like "3.14" ITestB *b = dynamic_cast<ITestB *>(a); if (b) { std::cout << b->test() << std::endl; // should print "1" or "0" } delete(a); return 0; } As long as I don't call C::test() directly there's nothing ambiguous, so I think that it should work somehow and I guess I just didn't find the right notation yet. Or is this impossible, if so: Why?

    Read the article

  • F#: Define an abstract class that inherits an infterface, but does not implement it

    - by akaphenom
    I owuld like to define an abstract class that inerhits from UserControl and my own Interface IUriProvider, but doesn't implement it. The goal is to be able to define pages (for silverlight) that implement UserControl but also provide their own Uri's (and then stick them in a list / array and deal with them as a set: type IUriProvider = interface abstract member uriString: String ; abstract member Uri : unit -> System.Uri ; end type UriUserControl() as this = inherit IUriProvider with abstract member uriString: String ; inherit UserControl() Also the Uri in the definition - I would like to implement as a property getter - and am having issues with that as well. this does not compile type IUriProvider = interface abstract member uriString: String with get; end Thank you...

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >