proxygen
a.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2018-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
17 
19 
20 namespace a_ns {
21 FOLLY_SETTING_DEFINE(follytest, public_flag_to_a, int, 456, "Public flag to a");
22 namespace {
23 FOLLY_SETTING_DEFINE(follytest, internal_flag_to_a, int, 789, "Desc of int");
24 }
25 
26 int a_func() {
27  return *FOLLY_SETTING(follytest, public_flag_to_a) +
28  *FOLLY_SETTING(follytest, internal_flag_to_a);
29 }
30 
31 void setRemote(int value) {
32  FOLLY_SETTING(follytest, public_flag_to_a).set(value, "remote_set");
33 }
34 
35 int getRemote() {
36  return *FOLLY_SETTING(follytest, public_flag_to_a);
37 }
38 
39 } // namespace a_ns
Definition: a.cpp:20
int getRemote()
Definition: a.cpp:35
void setRemote(int value)
Definition: a.cpp:31
FOLLY_SETTING_DEFINE(follytest, public_flag_to_a, int, 456,"Public flag to a")
static const char *const value
Definition: Conv.cpp:50
#define FOLLY_SETTING(_project, _name)
Definition: Settings.h:192
int a_func()
Definition: a.cpp:26