proxygen
some_ns Namespace Reference

Classes

struct  UserDefinedType
 

Functions

 FOLLY_SETTING_DEFINE (follytest, some_flag, std::string,"default","Description")
 
 FOLLY_SETTING_DEFINE (follytest, unused, std::string,"unused_default","Not used, but should still be in the list")
 
 FOLLY_SETTING_DEFINE (follytest, multi_token_type, unsigned int, 123,"Test that multi-token type names can be used")
 
template<class String >
void toAppend (const UserDefinedType &t, String *out)
 
 FOLLY_SETTING_DEFINE (follytest, user_defined, UserDefinedType,"b","User defined type constructed from string")
 

Function Documentation

some_ns::FOLLY_SETTING_DEFINE ( follytest  ,
some_flag  ,
std::string  ,
"default"  ,
"Description"   
)

Referenced by toAppend().

some_ns::FOLLY_SETTING_DEFINE ( follytest  ,
unused  ,
std::string  ,
"unused_default"  ,
"Not  used,
but should still be in the list"   
)
some_ns::FOLLY_SETTING_DEFINE ( follytest  ,
multi_token_type  ,
unsigned  int,
123  ,
"Test that multi-token type names can be used"   
)
some_ns::FOLLY_SETTING_DEFINE ( follytest  ,
user_defined  ,
UserDefinedType  ,
"b"  ,
"User defined type constructed from string  
)
template<class String >
void some_ns::toAppend ( const UserDefinedType t,
String *  out 
)

Definition at line 70 of file SettingsTest.cpp.

References FOLLY_SETTING_DEFINE(), and some_ns::UserDefinedType::value_.

70  {
71  if (t.value_ == 0) {
72  out->append("a_out");
73  } else if (t.value_ == 100) {
74  out->append("b_out");
75  } else {
76  throw std::runtime_error("Can't convert UserDefinedType to string");
77  }
78 }