Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate *Vocab methods in favour of *Vocab32 #2650

Merged
merged 8 commits into from
Jul 12, 2021

Conversation

drdanz
Copy link
Member

@drdanz drdanz commented Jul 9, 2021

Follow up to #2629, part of the methods where already replaced, but while updating another repo I realized that not all of them were ready. This has the unexpected advantage to make it easier to update (`/s/Vocab/Vocab32/g' will work in most cases).

This patch also adds a few overloads to avoid writing several time Vocab32 when it does not add any information.
For example:

-reply.addVocab(yarp::os::Vocab::encode("many"));

becomes

+reply.addVocab32("many");

Libraries

os

  • yarp::os::createVocab() is deprecated in favour of yarp::os::createVocab32()
  • yarp::os::Vocab::encode() is deprecated in favour of yarp::os::Vocab32::encode()
  • yarp::os::Vocab::decode() is deprecated in favour of yarp::os::Vocab32::decode()
  • yarp::os::Value::isVocab() is deprecated in favour of yarp::os::Value::isVocab32()
  • yarp::os::Value::asVocab() is deprecated in favour of yarp::os::Value::asVocab32()
  • yarp::os::Value::makeVocab() is deprecated in favour of yarp::os::Value::makeVocab32()
  • yarp::os::Bottle::addVocab() is deprecated in favour of yarp::os::Bottle::addVocab32()
  • yarp::os::WireReader::getIsVocab() is deprecated in favour of yarp::os::WireReader::getIsVocab32()

Bottle

  • Added addVocab32() overloads accepting 4 chars and string

Value

  • Added makeVocab32() overload accepting 4 chars

idl/WireWriter

  • Add addVocab32() overloads accepting 4 chars and string

@drdanz drdanz added PR Type: Feat/Enh This PR adds some new feature or enhances some part of YARP Component: Library - YARP_os Component: Deprecated Type: Deprecation Involves deprecating some part of YARP Target: YARP v3.5.0 labels Jul 9, 2021
@drdanz drdanz self-assigned this Jul 9, 2021
@drdanz drdanz force-pushed the vocab32_part2 branch 2 times, most recently from b8d7918 to b84809e Compare July 12, 2021 14:20
@drdanz drdanz temporarily deployed to code-analysis July 12, 2021 14:32 Inactive
@drdanz drdanz temporarily deployed to code-analysis July 12, 2021 14:32 Inactive
@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2021

@drdanz drdanz added the PR Status: Continuous Integration - OK Continuous Integration for this PR passed (invalid if commits were added or modified after this) label Jul 12, 2021
drdanz added 8 commits July 12, 2021 18:52
* `yarp::os::createVocab()` is deprecated in favour of
  `yarp::os::createVocab32()`
* `yarp::os::Vocab::encode()` is deprecated in favour of
  `yarp::os::Vocab32::encode()`
* `yarp::os::Vocab::decode()` is deprecated in favour of
  `yarp::os::Vocab32::decode()`
* `yarp::os::Value::isVocab()` is deprecated in favour of
  `yarp::os::Value::isVocab32()`
* `yarp::os::Value::asVocab()` is deprecated in favour of
  `yarp::os::Value::asVocab32()`
* `yarp::os::Value::makeVocab()` is deprecated in favour of
  `yarp::os::Value::makeVocab32()`
* `yarp::os::Bottle::addVocab()` is deprecated in favour of
  `yarp::os::Bottle::addVocab32()`
* `yarp::os::WireReader::getIsVocab()` is deprecated in favour of
  `yarp::os::WireReader::getIsVocab32()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Deprecated Component: Library - YARP_os PR Status: Continuous Integration - OK Continuous Integration for this PR passed (invalid if commits were added or modified after this) PR Type: Feat/Enh This PR adds some new feature or enhances some part of YARP Resolution: Merged Target: YARP v3.5.0 Type: Deprecation Involves deprecating some part of YARP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants