concrete5 is an open source content management system (CMS) for creating web and e-commerce applications.
Questions tagged [concrete]
75 questions
69
votes
5 answers
Finding the Concrete Type behind an Interface instance
To cut a long story short I have a C# function that performs a task on a given Type that is passed in as an Object instance. All works fine when a class instance is passed in. However, when the object is declared as an interface I'd really like to…
Rowan
50
votes
3 answers
C# Interface Inheritance to Abstract class
Suppose if I have an Interface as defined below:
public interface IFunctionality
{
void Method();
}
and I implement this interface for an abstract class as shown below:
public abstract class AbstractFunctionality: IFunctionality
{
…

Vikram
- 1,617
- 5
- 17
- 37
15
votes
3 answers
Unit Testing: coding to interfaces?
Currently my project is composed of various concrete classes. Now as I'm getting into unit testing it looks like I'm supposed to create an interface for each and every class (effectively doubling the number of classes in my project)? I happen to be…

User
- 62,498
- 72
- 186
- 247
10
votes
2 answers
c# Mocking Interface members of a concrete class with Moq
I have an interface ITransaction as follows:
public interface ITransaction {
DateTime EntryTime { get; }
DateTime ExitTime { get; }
}
and I have a derived class PaymentTransaction as follows:
public class PaymentTransaction :…

Raghu
- 2,678
- 2
- 31
- 38
6
votes
3 answers
Force trait to implement method
I have a trait I (intermediary), a class M (mixer) mixing in the trait and a trait S (specific).
class M extends Something with S {
def baz() = foo()
}
trait I {
def foo(): { ...; bar(); ... }
def bar()
}
trait S extends I {
def…

tobi
- 81
- 6
5
votes
3 answers
In UML, do you have to show the concrete implementation of an abstract method?
I'm drawing some UML in which a concrete class inherits from an abstract class which defines a pure virtual method. Is it required to show this method in the concrete class as well? It's implied by inheriting from the abstract class.

Jack BeNimble
- 35,733
- 41
- 130
- 213
5
votes
4 answers
C#: Method to return object whose concrete type is determined at runtime?
I'm thinking about designing a method that would return an object that implements an interface but whose concrete type won't be know until run-time. For example suppose:
ICar
Ford implements ICar
Bmw implements ICar
Toyota implements ICar
public…

User
- 62,498
- 72
- 186
- 247
4
votes
3 answers
PHP: Abstract method within an interface
why cannot I declare an abstract method within an interface? This is my code. Thank you.

gfr
- 41
- 1
- 2
3
votes
2 answers
haskell -- is -ddump-simpl the best way to get a concrete type?
I had previously written a function that seems to work, but unfortunately I didn't write the code very nicely, and now have to figure it out again [that I'm modifying the monad transformer stack I'm working with].
run_astvn ::
LowerMonadT…

gatoatigrado
- 16,580
- 18
- 81
- 143
3
votes
2 answers
Issues upgrading Concrete5 from 5.5.2.1 to 5.6.x
I'm currently updating a very old website from 5.4.x to 5.6.3.3. So far I've been able to upgrade to 5.5.2.1 locally without problems.
But upgrading from 5.5.2.1 to 5.6.x causes a lot of problems. I've tried updating directly to 5.6.3.3, which the…

Skovsgaard
- 339
- 2
- 19
3
votes
1 answer
SQLAlchemy declarative concrete autoloaded table inheritance
I've an already existing database and want to access it using SQLAlchemy. Because, the database structure's managed by another piece of code (Django ORM, actually) and I don't want to repeat myself, describing every table structure, I'm using…

drdaeman
- 11,159
- 7
- 59
- 104
3
votes
2 answers
Builder (Joshua Bloch-style) for concrete implementation of abstract class?
Let's say I have an abstract class (BaseThing). It has one required parameter ("base required") and one optional parameter ("base optional"). I have a concrete class that extends it (Thing). It also has one required parameter ("required") and one…

user1738853
- 85
- 5
2
votes
5 answers
Java - Can the children of an abstract class (the "extends"-ers) instantiate themselves via their parents abstract method?" i.e. m = new this();"?
First things first, please be aware I am trying to express my question as best I can with my current knowledge and vocabulary, so please excuse this...
I have an abstract class in which I want to make a method where it instantiates itself.... Of…

José
- 1,525
- 3
- 14
- 12
2
votes
0 answers
AbstractMethodError: This method must be defined in the concrete class type
df= df.drop(Karoo_output_2016_dry[df.Month == 1].index)
Can someone help me what is wrong?
Yesterday I used it and today it is giving this error.

RO123
- 21
- 2
2
votes
2 answers
I cannot access concrete class' methods polymorphically
I have an Interface MyInterface with two methods doSomething() and doSomethingElse().
I have an Abstract public class A that implements this interface.
I Have a class C that extends class A and therefore implements the interface's methods as…

D3bian0s
- 51
- 3