PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/Samples/EngineRunner/ERUtilities.h

http://macfuse.googlecode.com/
C++ Header | 22 lines | 2 code | 1 blank | 19 comment | 0 complexity | 335e51415377a52231bb2bdcd0f2114f MD5 | raw file
 1// Copyright 2008 Google Inc.
 2//
 3// Licensed under the Apache License, Version 2.0 (the "License");
 4// you may not use this file except in compliance with the License.
 5// You may obtain a copy of the License at
 6//
 7//     http://www.apache.org/licenses/LICENSE-2.0
 8//
 9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Some preprocessor magic to turn a command-line
16// -DUPDATE_ENGINE_VERSION=R35 into a string, and then into an
17// NSString.  With -DBLAH=SNORK Doing CONVERT_SYMBOL_TO_NSSTRING(BLAH)
18// will cause it to expand to CONVERT_SYMBOL_TO_NSSTRING2(SNORK).
19// Then CONVERT_SYMBOL_TO_NSSTRING_2 will stringize SNORK and turn it
20// into a quoted string, with the @ to turn it into an NSString.
21#define CONVERT_SYMBOL_TO_NSSTRING_2(x) @#x
22#define CONVERT_SYMBOL_TO_NSSTRING(x) CONVERT_SYMBOL_TO_NSSTRING_2(x)