-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAYA-127453: combine util.cpp/h and utils.cpp/h; add mayahydra namesp…
…ace instead of free functions (#345) * MAYA-127453: combine util.cpp/h and utils.cpp/h; add mayahydra namespace instead of free functions * MAYA-127453: remove using ns
- Loading branch information
1 parent
3d82cf9
commit 4bb3332
Showing
13 changed files
with
247 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// Copyright 2023 Autodesk | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#pragma once | ||
|
||
#define MAYAHYDRA_MAJOR_VERSION ${MAYAHYDRA_MAJOR_VERSION} | ||
#define MAYAHYDRA_MINOR_VERSION ${MAYAHYDRA_MINOR_VERSION} | ||
#define MAYAHYDRA_PATCH_LEVEL ${MAYAHYDRA_PATCH_LEVEL} | ||
|
||
// MayaHydra public namespace string will never change. | ||
#define MAYAHYDRA_NS MayaHydra | ||
// C preprocessor trickery to expand arguments. | ||
#define MAYAHYDRA_CONCAT(A, B) MAYAHYDRA_CONCAT_IMPL(A, B) | ||
#define MAYAHYDRA_CONCAT_IMPL(A, B) A##B | ||
// Versioned namespace includes the major version number. | ||
#define MAYAHYDRA_VERSIONED_NS MAYAHYDRA_CONCAT(MAYAHYDRA_NS, _v${MAYAHYDRA_MAJOR_VERSION}) | ||
|
||
namespace MAYAHYDRA_VERSIONED_NS {} | ||
|
||
// With a using namespace declaration, pull in the versioned namespace into the | ||
// MayaHydra public namespace, to allow client code to use the plain MayaHydra | ||
// namespace, e.g. MayaHydra::Class. | ||
namespace MAYAHYDRA_NS { | ||
using namespace MAYAHYDRA_VERSIONED_NS; | ||
} | ||
|
||
// Macro to place the MayaHydra symbols in the versioned namespace, which is how | ||
// they will appear in the shared library, e.g. MayaHydra_v1::Class. | ||
#ifdef DOXYGEN | ||
#define MAYAHYDRA_NS_DEF MAYAHYDRA_NS | ||
#else | ||
#define MAYAHYDRA_NS_DEF MAYAHYDRA_VERSIONED_NS | ||
#endif |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.