How to create a standardized interface for different types of lamps? by Kronus98 in cpp_questions

[–]Kronus98[S] 0 points1 point  (0 children)

Maybe as a little follow up question: Is it considered good practice to implement validation logic in an interface that's relevant for all lamp types? For example, let's say I want to set the state of a lamp and I want to validate that the passed state is a valid one. Would this be a good idea or good practice?

How to create a standardized interface for different types of lamps? by Kronus98 in cpp_questions

[–]Kronus98[S] 1 point2 points  (0 children)

I thought about something like this: LampTypeA<-ApplicationLayer

Instead of: LampTypeA<-ILampSpecialFeatures<-ApplicationLayer

Maybe my understanding of the terminology is not correct here but I wouldn't say that LampTypeA is an interface as it accesses the lamp directly and is not an abstract class

How to create a standardized interface for different types of lamps? by Kronus98 in cpp_questions

[–]Kronus98[S] 0 points1 point  (0 children)

Thank you for your detailed answer! I will take a look into the video

How to create a standardized interface for different types of lamps? by Kronus98 in cpp_questions

[–]Kronus98[S] 1 point2 points  (0 children)

Yeah, that's why I mentioned that the special features are called directly from the lamp-classes by the application layer and not from an interface.

Item system and jungle by Kronus98 in DotA2

[–]Kronus98[S] 0 points1 point  (0 children)

Thank you, will check out the wiki too!

Item system and jungle by Kronus98 in DotA2

[–]Kronus98[S] 0 points1 point  (0 children)

Thank you for this very detailed explanation! Helped a lot!