diff --git a/src/data.cpp b/src/data.cpp index bbf94e8..ddddba7 100644 --- a/src/data.cpp +++ b/src/data.cpp @@ -284,14 +284,14 @@ bool Value::idStartsWith(const std::string& prefix) const return ID.size()>=prefix.size() && prefix==ID.substr(0u, prefix.size()); } -const std::string &Value::nameOf(const Value& decendent) const +const std::string &Value::nameOf(const Value& descendant) const { - if(!store || !decendent.store) + if(!store || !descendant.store) throw NoField(); auto pidx = store->index(); - auto didx = decendent.store->index(); + auto didx = descendant.store->index(); if(pidx >= didx || didx >= store->top->members.size()) - throw std::logic_error("not a decendent"); + throw std::logic_error("not a descendant"); // inefficient, but we don't keep a reverse mapping for(auto& it : desc->mlookup) { @@ -299,7 +299,7 @@ const std::string &Value::nameOf(const Value& decendent) const return it.first; } - throw std::logic_error("missing decendent"); + throw std::logic_error("missing descendant"); } namespace { diff --git a/src/dataencode.cpp b/src/dataencode.cpp index 0973979..e184a0f 100644 --- a/src/dataencode.cpp +++ b/src/dataencode.cpp @@ -91,7 +91,7 @@ void from_wire(Buffer& buf, std::vector& descs, TypeStore& cache, uns } else { auto& entry = cache[key]; - // copy new node, and any decendents into cache + // copy new node, and any descendants into cache entry.resize(descs.size()-index); std::copy(descs.begin()+index, descs.end(), @@ -184,7 +184,7 @@ void from_wire(Buffer& buf, std::vector& descs, TypeStore& cache, uns name+='.'; if(code.code==TypeCode::Struct && code==cfld.code) { - // copy decendent indicies for sub-struct + // copy descendant indicies for sub-struct for(auto& pair : cfld.mlookup) { fld.mlookup[name+pair.first] = cindex - cref + pair.second; } diff --git a/src/dataimpl.h b/src/dataimpl.h index b18fde6..6c21bf1 100644 --- a/src/dataimpl.h +++ b/src/dataimpl.h @@ -45,7 +45,7 @@ struct Buffer; /** Describes a single field, leaf or otherwise, in a nested structure. * * FieldDesc are always stored depth first as a contigious array, - * with offset to decendent fields given as positive integers relative + * with offset to descendant fields given as positive integers relative * to the current field. (not possible to jump _back_) * * We deal with two different numeric values: @@ -58,7 +58,7 @@ struct FieldDesc { // type ID string (Struct/Union) std::string id; - // Lookup of all decendent fields of this Structure or Union. + // Lookup of all descendant fields of this Structure or Union. // "fld.sub.leaf" -> rel index // For Struct, relative to this // For Union, offset in members array diff --git a/src/pvxs/client.h b/src/pvxs/client.h index 25ee6ee..4a20812 100644 --- a/src/pvxs/client.h +++ b/src/pvxs/client.h @@ -116,7 +116,7 @@ struct PVXS_API Operation { /** @brief Block until Operation completion * - * As an alternative to a .result() callback, wait for operation competion, + * As an alternative to a .result() callback, wait for operation completion, * timeout, or interruption (via. interrupt() ). * * @param timeout Time to wait prior to throwing TimeoutError. cf. epicsEvent::wait(double) @@ -158,7 +158,7 @@ struct PVXS_API Subscription { * @returns A valid Value until the queue is empty * @throws Connected (depending on MonitorBuilder::maskConnected()) * @throws Disconnect (depending on MonitorBuilder::maskDisconnect()) - * @throws Finished (depending on MonitorBuilder::maskDisonnect()) + * @throws Finished (depending on MonitorBuilder::maskDisconnect()) * @throws RemoteError For server signaled errors * @throws std::exception For client side failures. * @@ -199,7 +199,7 @@ public: //! An empty/dummy Context constexpr Context() = default; //! Create/allocate a new client with the provided config. - //! Config::build() is a convienent shorthand. + //! Config::build() is a convenient shorthand. explicit Context(const Config &); ~Context(); @@ -437,7 +437,7 @@ public: /** Parse pvRequest string. * * Supported syntax is a list of zero or more entities - * seperated by zero or more spaces. + * separated by zero or more spaces. * * - field() * - record(=\) @@ -601,7 +601,7 @@ public: MonitorBuilder& event(std::function&& cb) { _event = std::move(cb); return *this; } //! Include Connected exceptions in queue (default false). MonitorBuilder& maskConnected(bool m = true) { _maskConn = m; return *this; } - //! Include Disconnected exceptiosn in queue (default true). + //! Include Disconnected exceptions in queue (default true). MonitorBuilder& maskDisconnected(bool m = true) { _maskDisconn = m; return *this; } PVXS_API diff --git a/src/pvxs/data.h b/src/pvxs/data.h index b4a2f4e..ca23688 100644 --- a/src/pvxs/data.h +++ b/src/pvxs/data.h @@ -42,8 +42,8 @@ struct FieldStorage; struct FieldDesc; //! maps T to one of the types which can be stored in the FieldStorage::store union -//! typename StorageMap::store_t is, if existant, one such type. -//! store_t shall be convertable-able to/from T through StoreTransform::in() and out(). +//! typename StorageMap::store_t is, if existent, one such type. +//! store_t shall be convertible to/from T through StoreTransform::in() and out(). //! StorageMap::code is the associated StoreType. template struct StorageMap; @@ -58,7 +58,7 @@ template struct StorageMap::value && !std::is_signed::value && !std::is_same::value>::type> { typedef uint64_t store_t; static constexpr StoreType code{StoreType::UInteger}; }; -// map floating point to double. (truncates long double, but then PVA doesn't have >8 byte primatives support anyway) +// map floating point to double. (truncates long double, but then PVA doesn't have >8 byte primitives support anyway) template struct StorageMap::value>::type> { typedef double store_t; static constexpr StoreType code{StoreType::Real}; }; @@ -247,7 +247,7 @@ public: inline Member() :code(TypeCode::Null) {} - //! Member for non-Compund + //! Member for non-Compound //! @pre code.kind()!=Kind::Compound inline Member(TypeCode code, const std::string& name) @@ -348,7 +348,7 @@ CASE(UnionA) * def1.as("special"), // compose definitions * }); * - * auto val = def2.create(); // instanciate a Value + * auto val = def2.create(); // instantiate a Value * }); * @endcode */ @@ -420,7 +420,7 @@ public: return *this; } - //! Instanciate this definition + //! Instantiate this definition Value create() const; friend @@ -464,7 +464,7 @@ class PVXS_API Value { friend class TypeDef; // (maybe) storage for this field. alias of StructTop::members[] std::shared_ptr store; - // (maybe) owned thourgh StructTop (aliased as FieldStorage) + // (maybe) owned through StructTop (aliased as FieldStorage) const impl::FieldDesc* desc; public: struct Helper; @@ -533,15 +533,15 @@ public: // int compareValue(const Value&) const; inline int compareType(const Value& o) const { return desc==o.desc; } - /** Return our name for a decendent field. + /** Return our name for a descendant field. * @code * Value v = ...; * assert(v.nameOf(v["some.field"])=="some.field"); * @endcode - * @throws NoField unless both this and decendent are valid() - * @throws std::logic_error if decendent is not actually a decendent + * @throws NoField unless both this and descendant are valid() + * @throws std::logic_error if descendant is not actually a descendant */ - const std::string& nameOf(const Value& decendent) const; + const std::string& nameOf(const Value& descendant) const; // access to Value's ... value // not for Struct @@ -626,7 +626,7 @@ public: return *this; } - //! shorthand for from(const T&) except for T=Value (would be ambigious with ref. assignment) + //! shorthand for from(const T&) except for T=Value (would be ambiguous with ref. assignment) template #ifdef _DOXYGEN_ Value& @@ -643,11 +643,11 @@ private: void traverse(const std::string& expr, bool modify); public: - /** Attempt to access a decendant field. + /** Attempt to access a descendant field. * * Argument may be: * * name of a child field. eg. "value" - * * name of a decendant field. eg "alarm.severity" + * * name of a descendant field. eg "alarm.severity" * * element of an array of structures. eg "dimension[0]" * * name of a union field. eg. "booleanValue" * @@ -656,7 +656,7 @@ public: * * "dimension[0]size" * * "value->booleanValue" * - * @returns A valid() Value if the decendant field exists, otherwise an invalid Value. + * @returns A valid() Value if the descendant field exists, otherwise an invalid Value. */ Value operator[](const char *name); inline Value operator[](const std::string& name) { return (*this)[name.c_str()]; } @@ -691,7 +691,7 @@ public: template class Iterable; - /** Depth-first iteration of all decendent fields + /** Depth-first iteration of all descendant fields * * @code * Value top(...); @@ -705,7 +705,7 @@ public: //! iteration of all child fields inline Iterable ichildren(); - //! Depth-first iteration of all marked decendent fields + //! Depth-first iteration of all marked descendant fields inline Iterable imarked(); diff --git a/src/pvxs/nt.h b/src/pvxs/nt.h index 01900cb..ebe82e0 100644 --- a/src/pvxs/nt.h +++ b/src/pvxs/nt.h @@ -26,7 +26,7 @@ struct TimeStamp { * def += { * Member(TypeCode::String, "myspecial"), * }; - * auto value = def.create(); // instanciate a Value + * auto value = def.create(); // instantiate a Value * @endcode */ struct NTScalar { @@ -50,7 +50,7 @@ struct NTScalar { //! A TypeDef which can be appended PVXS_API TypeDef build() const; - //! Instanciate + //! Instantiate inline Value create() const { return build().create(); } @@ -60,14 +60,14 @@ struct NTScalar { * * @code * auto def = pvxs::nt::NTNDArray{}.build(); - * auto value = def.create(); // instanciate a Value + * auto value = def.create(); // instantiate a Value * @endcode */ struct NTNDArray { //! A TypeDef which can be appended PVXS_API TypeDef build() const; - //! Instanciate + //! Instantiate inline Value create() const { return build().create(); } @@ -82,7 +82,7 @@ public: inline TypeDef build() const { return _def; } - //! Instanciate + //! Instantiate inline Value create() const { return build().create(); } diff --git a/src/pvxs/server.h b/src/pvxs/server.h index 45c305a..4a99c65 100644 --- a/src/pvxs/server.h +++ b/src/pvxs/server.h @@ -39,7 +39,7 @@ struct Config; * In order to be useful, a Server will have one or more Source instances added * to it with addSource(). * - * As a convienence, each Server instance automatically contains a "builtin" StaticSource + * As a convenience, each Server instance automatically contains a "builtin" StaticSource * to which SharedPV instances can be directly added. * The "builtin" has priority zero, and can be accessed or even removed like any Source * explicitly added with addSource(). @@ -61,7 +61,7 @@ public: /** start() and then (maybe) stop() * - * run() may be interupted by calling interrupt(), + * run() may be interrupted by calling interrupt(), * or by SIGINT or SIGTERM (only one Server per process) * * Intended to simple CLI programs. @@ -119,7 +119,7 @@ struct PVXS_API Config { std::vector interfaces; //! Addresses (**not** host names) to which (UDP) beacons message will be sent. //! May include broadcast and/or unicast addresses. - //! Supplimented iif auto_beacon==true + //! Supplemented iif auto_beacon==true std::vector beaconDestinations; //! TCP port to bind. Default is 5075. May be zero. unsigned short tcp_port = 5075; @@ -134,7 +134,7 @@ struct PVXS_API Config { //! Default configuration using process environment static Config from_env(); - //! Configuration limited to the local loopback interface on a randomly choosen port. + //! Configuration limited to the local loopback interface on a randomly chosen port. //! Suitable for use in self-contained unit-tests. static Config isolated(); diff --git a/src/pvxs/sharedArray.h b/src/pvxs/sharedArray.h index ce9a5de..ee2195a 100644 --- a/src/pvxs/sharedArray.h +++ b/src/pvxs/sharedArray.h @@ -201,7 +201,7 @@ shared_array copyAs(ArrayType dtype, ArrayType stype, const void *sbase, s } // namespace detail -/** std::vector-like contigious array of items passed by reference. +/** std::vector-like contiguous array of items passed by reference. * * shared_array comes in const and non-const, as well as void and non-void variants. * diff --git a/src/pvxs/source.h b/src/pvxs/source.h index 166f23a..34d207f 100644 --- a/src/pvxs/source.h +++ b/src/pvxs/source.h @@ -71,7 +71,7 @@ public: } //! Add a new entry to the monitor queue. - //! If nFree()<=0 this element will be "squshed" to the last element in the queue + //! If nFree()<=0 this element will be "squashed" to the last element in the queue //! Returns @code nFree()>0u @endcode bool post(Value&& val) { return doPost(std::move(val), false, false); @@ -198,7 +198,7 @@ struct PVXS_API Source { //! The Client endpoint address const char* source() const { return _src; } }; - /** Called each time a client polls for the existance of some Channel names. + /** Called each time a client polls for the existence of some Channel names. * * A Source may only Search::claim() a Channel name if it is prepared to * immediately accept an onCreate() call for that Channel name. diff --git a/src/pvxs/srvcommon.h b/src/pvxs/srvcommon.h index db42400..65323a3 100644 --- a/src/pvxs/srvcommon.h +++ b/src/pvxs/srvcommon.h @@ -21,7 +21,7 @@ struct PVXS_API OpBase { Info, //!< A GET_FIELD operation Get, //!< A GET operation Put, //!< A PUT operation - RPC, //!< A RPC operaton + RPC, //!< A RPC operation }; protected: std::string _peerName; diff --git a/src/pvxs/util.h b/src/pvxs/util.h index 4dd01b4..efb325a 100644 --- a/src/pvxs/util.h +++ b/src/pvxs/util.h @@ -42,7 +42,7 @@ std::ostream& operator<<(std::ostream& strm, const Escaper& esc); } // namespace detail -//! Print string to output stream with non-printable charactors escaped. +//! Print string to output stream with non-printable characters escaped. //! //! Outputs (almost) C-style escapes. //! Prefers short escapes for newline, tab, quote, etc ("\\n"). @@ -58,14 +58,14 @@ std::ostream& operator<<(std::ostream& strm, const Escaper& esc); inline detail::Escaper escape(const std::string& s) { return detail::Escaper(s.c_str(), s.size()); } -//! Print nil terminated char array to output stream with non-printable charactors escaped. +//! Print nil terminated char array to output stream with non-printable characters escaped. //! @code //! std::cout<