chromium/third_party/mediapipe/src/mediapipe/framework/tool/validate_name.cc

// Copyright 2019 The MediaPipe Authors.
//
// 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.

// Definition of helper functions.
#include "mediapipe/framework/tool/validate_name.h"

#include <cstdint>

#include "absl/strings/escaping.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
#include "absl/strings/str_split.h"
#include "mediapipe/framework/port/canonical_errors.h"
#include "mediapipe/framework/port/core_proto_inc.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/port/ret_check.h"
#include "mediapipe/framework/port/source_location.h"
#include "mediapipe/framework/port/status_builder.h"
#include "mediapipe/framework/port/status_macros.h"

namespace mediapipe {
namespace tool {
#define MEDIAPIPE_NAME_REGEX
#define MEDIAPIPE_NUMBER_REGEX
#define MEDIAPIPE_TAG_REGEX
#define MEDIAPIPE_TAG_AND_NAME_REGEX
#define MEDIAPIPE_TAG_INDEX_NAME_REGEX
#define MEDIAPIPE_TAG_INDEX_REGEX

absl::Status GetTagAndNameInfo(
    const proto_ns::RepeatedPtrField<ProtoString>& tags_and_names,
    TagAndNameInfo* info) {}

absl::Status SetFromTagAndNameInfo(
    const TagAndNameInfo& info,
    proto_ns::RepeatedPtrField<ProtoString>* tags_and_names) {}

absl::Status ValidateName(const std::string& name) {}

absl::Status ValidateNumber(const std::string& number) {}

absl::Status ValidateTag(const std::string& tag) {}

absl::Status ParseTagAndName(absl::string_view tag_and_name, std::string* tag,
                             std::string* name) {}

absl::Status ParseTagIndexName(const std::string& tag_index_name,
                               std::string* tag, int* index,
                               std::string* name) {}

absl::Status ParseTagIndex(const std::string& tag_index, std::string* tag,
                           int* index) {}

#undef MEDIAPIPE_NAME_REGEX
#undef MEDIAPIPE_TAG_REGEX
#undef MEDIAPIPE_TAG_AND_NAME_REGEX
#undef MEDIAPIPE_TAG_INDEX_NAME_REGEX
#undef MEDIAPIPE_TAG_INDEX_REGEX

}  // namespace tool
}  // namespace mediapipe