Class CppNames

java.lang.Object
dev.nokee.commons.names.CppNames

public final class CppNames extends Object
Task and configuration names for cpp-library, cpp-application and cpp-unit-test plugins.
  • Constructor Details

    • CppNames

      public CppNames()
  • Method Details

    • of

      public static CppNames.ForBinary of(CppBinary binary)
    • of

      public static CppNames.ForComponent of(CppComponent component)
    • qualifyingName

      public static QualifyingName qualifyingName(Named componentOrBinary)
      Returns the qualifying name for nested domain object of the specified C++ component or binary.

      We use deep modeling of the domain object name to allow horizontal name translation. Because of the accordion naming scheme, some dimensions of the name may be lost. For this reason, we will try our best to account for those lost dimensions.

      Parameters:
      componentOrBinary - the C++ component/binary object to extract the qualifying name from, must not be null
      Returns:
      a qualifying name
    • cppApiElementsConfigurationName

      public static String cppApiElementsConfigurationName(CppComponent component)
      Returns the qualifyingNameCppApiElements configuration name. For example:
      • cppApiElements
      Note: does not exist for CppTestSuite, for convenience only
      Parameters:
      component - the C++ component object that qualify the configuration name, must not be null
      Returns:
      a configuration name
    • implementationConfigurationName

      public static String implementationConfigurationName(CppComponent component)
      Returns the qualifyingNameImplementation configuration name. For example:
      Parameters:
      component - the C++ component object that qualify the configuration name, must not be null
      Returns:
      a configuration name
      See Also:
    • apiConfigurationName

      public static String apiConfigurationName(CppComponent component)
      Returns the qualifyingNameApi configuration name. For example: Note: does not exist for anything else, for convenience only.
      Parameters:
      component - the C++ component object that qualify the configuration name, must not be null
      Returns:
      a configuration name
    • implementationConfigurationName

      public static String implementationConfigurationName(CppBinary binary)
      Returns the binaryNameImplementation configuration name. For example:
      • mainReleaseImplementation
      • mainLinuxDebugImplementation
      • testExecutableImplementation - for CppTestExecutable
      Note: this name diverge from the typical naming scheme.
      Parameters:
      binary - the C++ binary object that qualify the configuration name, must not be null
      Returns:
      a configuration name
    • linkElementsConfigurationName

      public static String linkElementsConfigurationName(CppBinary binary)
      Returns the qualifyingNameLinkElements configuration name. For example:
      • releaseLinkElements
      • linuxDebugLinkElements
      Note: does not exist for CppTestExecutable.
      Parameters:
      binary - the C++ binary object that qualify the configuration name, must not be null
      Returns:
      a configuration name
    • runtimeElementsConfigurationName

      public static String runtimeElementsConfigurationName(CppBinary binary)
      Returns the qualifyingNameRuntimeElements configuration name. For example:
      • releaseRuntimeElements
      • linuxDebugRuntimeElements
      Note: does not exist for CppTestExecutable.
      Parameters:
      binary - the C++ binary object that qualify the configuration name, must not be null
      Returns:
      a configuration name
    • nativeLinkConfigurationName

      public static String nativeLinkConfigurationName(CppBinary binary)
      Returns the nativeLinkQualifyingName configuration name. For example:
      • nativeLinkRelease
      • nativeLinkLinuxDebug
      • nativeLinkTest
      Parameters:
      binary - the C++ binary object that qualify the configuration name, must not be null
      Returns:
      a configuration name
    • nativeRuntimeConfigurationName

      public static String nativeRuntimeConfigurationName(CppBinary binary)
      Returns the nativeRuntimeQualifyingName configuration name. For example:
      • nativeRuntimeRelease
      • nativeRuntimeLinuxDebug
      • nativeRuntimeTest
      Parameters:
      binary - the C++ binary object that qualify the configuration name, must not be null
      Returns:
      a configuration name
    • compileTaskName

      public static String compileTaskName(CppBinary binary)
      Returns the compileQualifyingNameCpp task name. For example:
      • compileReleaseCpp
      • compileLinuxDebugCpp
      • compileTestCpp
      Parameters:
      binary - the C++ binary object that qualify the task name, must not be null
      Returns:
      a task name
    • compileTaskName

      public static String compileTaskName(CppBinary binary, String language)
      Returns the compileQualifyingNameLanguage task name. For example:
      • compileReleaseC
      • compileTestDebugObjCpp
      Note: mixed language compilation does not exist, for convenience only.
      Parameters:
      binary - the C++ binary object that qualify the task name, must not be null
      language - the implementation language to compile, must not be null
      Returns:
      a task name
    • linkTaskName

      public static String linkTaskName(CppBinary binary)
      Returns the linkQualifyingName task name. For example:
      • linkRelease
      • linkLinuxDebug
      • linkTest
      Parameters:
      binary - the C++ binary object that qualify the task name, must not be null
      Returns:
      a task name
    • cppCompileConfigurationName

      public static String cppCompileConfigurationName(CppBinary binary)
      Returns the cppCompileQualifyingName configuration name. For example:
      • cppCompileRelease
      • cppCompileLinuxDebug
      • cppCompileTest
      Parameters:
      binary - the C++ binary object that qualify the configuration name, must not be null
      Returns:
      a configuration name