# Creating abstract device class

**URL:** <https://forums.unrealengine.com/t/creating-abstract-device-class/1518537>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [December 12, 2023, 12:42am UTC](https://forums.unrealengine.com/t/creating-abstract-device-class/1518537 "2023-12-12T00:42:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enebz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enebz/32/875411_2.png) [@Enebz](https://forums.unrealengine.com/u/Enebz)\
**Post date:** [December 12, 2023, 12:42am UTC](https://forums.unrealengine.com/t/creating-abstract-device-class/1518537/1 "2023-12-12T00:42:38Z")

</div>

I need a class which should work as a “template” device for “sub-devices”. My first idea was to use abstract classes, however I tried this:

```auto
switch_choice_handler := class<abstract>(creative_device):

```

But it gave this error: (which is expected)  
`concrete` classes must not be `abstract. `concrete`class switch_choice_handler is`abstract`.(3632)

So basically, I am abstractifying a device I already have so that it can take in any subclass-device that inherits this main template, and use the shared functions that they all take from the parent class.

**How can I achieve this? Thanks in advance!**

---

<div class="post-metadata">

**Author:** ![jqvim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jqvim](https://forums.unrealengine.com/u/jqvim)\
**Post date:** [December 12, 2023, 4:12am UTC](https://forums.unrealengine.com/t/creating-abstract-device-class/1518537/2 "2023-12-12T04:12:25Z")

</div>

Something you can do is make your base device have default functions (for void-returning ones you can use `{}` or `block:`), subclasses can then override them. It’s not as “pretty” as having an abstract class but that’s the next best thing in this scenario.
