Category "inheritance"

best practices in structuring jinja templates (flask)

I wrote a site in bootstrap and thinking about refactoring it in jinja. I am not much familiar with nesting blocks, and the site is relatively simple. My goal i

LEMON Graph library: Inheritance in Maps

in my PhD project, I want to create a graph using LEMON. The graph itself is directed and hierarchical meaning that the graph has a tree-like shape. The leaves

This is confusing, is there any tips so I can understand this better? (OOP Inheritances)

I am having difficulties understanding what to do here. Please bear with me I'm new to JavaScript and this section is giving me a hard time understanding how I

Use templates to implement a subset of multiple virtual methods of a templated class

I am working on incorporating a new implementation based on an older, fixed API and moving in somewhat contradicting terrain because I need to pair a templated

How to overwrite default value of parameter in python __init__ method from class with two levels of inheritance:

I need to overwrite the default parameter value of __init__ method of a class that is on a three-party model which inherits from another three-party module, but

Explicitly calling base class constructor in derived class

May I ask if we are allowed to explicitly call base class constructor in derived class? (if not, why?) I'm asking this question because I wrote the following to

Is it possible to inherit a parent class instance attribute directly into a child class instance in Python?

Here is the code that I have put together so far (and I understand why it does not work), but it illustrates what I am trying to achieve. First there is one pa

Deleting a pointer from a vector... Error: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

I'm getting the error after I delete a pointer from the vector and try to delete a second one. I'm still new to pointers I created a base class of shapes and ha

What is the reason for the lack of inheritance of text-decoration? [closed]

So I've read the previous disccussion on this topic and I understand that text-decoration is propagated instead of inherited, but the spec doe

Dart abstract factory method

I'm pulling table data from api in my application that I wrote with Flutter. According to the API used in the table data, different types of data are coming. I

Column Inheritance for Independent ORM Mapper Classes In SQL Alchemy

I am trying to replicate the following SQLite CREATE TABLE statements using the declarative ORM mapper classes in SQLALchemy. CREATE TABLE IF NOT EXISTS questio

Architecture of sub-classes in C++

I learn C++ OOP-paradigm and want to ask related question: Assumption We have a base class: class Base { public: virtual SomeType PowerMethod() { return So

Python generic that adds typed functionality to extend existing types incorrectly typed

I am interested in creating a generic to add a fixed functionality to different types in python. I have a semi working solution, but it's tying is problematic.

wrap inherited classes in Python

Let's say I have a number of inherited classes class Bird: def __init__(self): pass def identify(self): print("I am a generic bird!")

Python exception type object inheritance

I need to retrieve the name of the object in which an error has occured. The error is catched in a try exception statement. The error type as returned by err_ty

Inheritance and std::shared_ptr in Cython

Suppose I have the following simple example of C++ inheritance in file.h: class Base {}; class Derived : public Base {}; Then, the following code compiles; tha

Virtual Method not calling derived class method (only calling base class) C++

My base class detect() and collect() methods are the only ones being called. I'm trying to get the derived class methods of these to be printed instead. I belie

how to define deep copy of subclass if super class has customized deep copy

My super class A has a method copy(), which is a customized deep copy function. The sub class B wants to inherit this deep-copy function while also deep-copying

R R6 Inheritance with roxygen2 - class "ParentClass" is not exported by 'namespace:ParentPackage'

I am running into an issue with R6 inheritance. I am writing 2 packages (work related so I have to use fake code but I'll try to keep it accurate). In ParentPac

JPA Inheritance with JOINED strategy

I've seen many posts about inheritance but nothing match my problem. I try to build a correct objects model: The root class @Entity @Inheritance(strategy = I