OpFlex Framework 1.7.0
URIBuilder.h
Go to the documentation of this file.
1/* -*- C++ -*-; c-basic-offset: 4; indent-tabs-mode: nil */
6/*
7 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
8 *
9 * This program and the accompanying materials are made available under the
10 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
11 * and is available at http://www.eclipse.org/legal/epl-v10.html
12 */
13
14#ifndef OPFLEX_MODB_URIBUILDER_H
15#define OPFLEX_MODB_URIBUILDER_H
16
17#include <string>
18
19#include "opflex/modb/URI.h"
20#include "opflex/modb/MAC.h"
21
22namespace opflex {
23namespace modb {
24
31
36public:
41
47 URIBuilder(const URI& uri);
48
53
60 URIBuilder& addElement(const std::string& elementValue);
61
67 URIBuilder& addElement(uint32_t elementValue);
68
74 URIBuilder& addElement(int32_t elementValue);
75
81 URIBuilder& addElement(uint64_t elementValue);
82
88 URIBuilder& addElement(int64_t elementValue);
89
95 URIBuilder& addElement(const MAC& elementValue);
96
104 URIBuilder& addElement(const URI& elementValue);
105
110
111private:
112 class URIBuilderImpl;
113 friend class URIBuilderImpl;
114 URIBuilderImpl* pimpl;
115};
116
117/* @} modb */
118/* @} cpp */
119
120} /* namespace modb */
121} /* namespace opflex */
122
123#endif /* OPFLEX_MODB_URIBUILDER_H */
Interface definition file for MACs.
Interface definition file for URIs.
A MAC address is used to identify devices on an ethernet network.
Definition MAC.h:37
A URI is used to identify managed objects in the MODB.
Definition URI.h:43
URIBuilder & addElement(const URI &elementValue)
Add a URI path element to the URI path.
URIBuilder & addElement(const std::string &elementValue)
Add a string-valued path element to the URI path, and URI-escape the value.
URI build()
Build the URI from the path elements and return it.
URIBuilder()
Construct an empty URI builder representing the root element.
~URIBuilder()
Destroy the URI Builder.
URIBuilder & addElement(uint64_t elementValue)
Add an unsigned int-valued path element to the URI path.
URIBuilder(const URI &uri)
Construct a URI builder that will append URI elements to the specified URI.
URIBuilder & addElement(uint32_t elementValue)
Add an unsigned int-valued path element to the URI path.
URIBuilder & addElement(const MAC &elementValue)
Add a mac-address-valued path element to the URI path.
URIBuilder & addElement(int32_t elementValue)
Add a signed int-valued path element to the URI path.
URIBuilder & addElement(int64_t elementValue)
Add a signed int-valued path element to the URI path.