aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/objects/objectoperation.h
blob: 734397ff67004f67585cc1abe36b707bff95b47f (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 2016 Yahoo Inc. 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