aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/objects/objectoperation.h
blob: b99729b7344557183073f4fad22526d46e6fc279 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

namespace vespalib {

class Identifiable;

/**
 * An operation that is able to operate on a generic object.
 **/
class ObjectOperation
{
public:
    /**
     * Apply this operation to the given object.
     *
     * @param obj the object to operate on
     **/
    virtual void execute(Identifiable &obj) = 0;

    /**
     * empty
     **/
    virtual ~ObjectOperation() { }
};

} // namespace vespalib