fix spelling in public headers
This commit is contained in:
+5
-5
@@ -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 {
|
||||
|
||||
+2
-2
@@ -91,7 +91,7 @@ void from_wire(Buffer& buf, std::vector<FieldDesc>& 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<FieldDesc>& 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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+5
-5
@@ -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(<fld.name>)
|
||||
* - record(<key>=\<value>)
|
||||
@@ -601,7 +601,7 @@ public:
|
||||
MonitorBuilder& event(std::function<void(Subscription&)>&& 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
|
||||
|
||||
+17
-17
@@ -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<T>::store_t is, if existant, one such type.
|
||||
//! store_t shall be convertable-able to/from T through StoreTransform<T>::in() and out().
|
||||
//! typename StorageMap<T>::store_t is, if existent, one such type.
|
||||
//! store_t shall be convertible to/from T through StoreTransform<T>::in() and out().
|
||||
//! StorageMap<T>::code is the associated StoreType.
|
||||
template<typename T, typename Enable=void>
|
||||
struct StorageMap;
|
||||
@@ -58,7 +58,7 @@ template<typename T>
|
||||
struct StorageMap<T, typename std::enable_if<std::is_integral<T>::value && !std::is_signed<T>::value && !std::is_same<T,bool>::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<typename T>
|
||||
struct StorageMap<T, typename std::enable_if<std::is_floating_point<T>::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<impl::FieldStorage> 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<T>(const T&) except for T=Value (would be ambigious with ref. assignment)
|
||||
//! shorthand for from<T>(const T&) except for T=Value (would be ambiguous with ref. assignment)
|
||||
template<typename T>
|
||||
#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<typename V>
|
||||
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<Value> ichildren();
|
||||
//! Depth-first iteration of all marked decendent fields
|
||||
//! Depth-first iteration of all marked descendant fields
|
||||
inline
|
||||
Iterable<Value> imarked();
|
||||
|
||||
|
||||
+5
-5
@@ -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();
|
||||
}
|
||||
|
||||
+4
-4
@@ -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<std::string> 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<std::string> 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();
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ shared_array<void> 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.
|
||||
*
|
||||
|
||||
+2
-2
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
+3
-3
@@ -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<<pvxs::escape("this \"is a test\"");
|
||||
//! @endcode
|
||||
inline detail::Escaper escape(const char* s) {
|
||||
return detail::Escaper(s);
|
||||
}
|
||||
//! Print fixed length char array to output stream with non-printable charactors escaped.
|
||||
//! Print fixed length char array to output stream with non-printable characters escaped.
|
||||
//! @code
|
||||
//! std::cout<<pvxs::escape("this \"is a test\"", 6);
|
||||
//! // prints 'this \"'
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ void testIter()
|
||||
testDiag("field %s", val.nameOf(fld).c_str());
|
||||
i++;
|
||||
}
|
||||
testEq(i, 9u)<<"# of decendent fields";
|
||||
testEq(i, 9u)<<"# of descendant fields";
|
||||
|
||||
i=0;
|
||||
for(auto fld : val.ichildren()) {
|
||||
@@ -105,7 +105,7 @@ void testIter()
|
||||
return testEq(i, expect);
|
||||
};
|
||||
|
||||
testMarked(0u)<<"no decendent fields";
|
||||
testMarked(0u)<<"no descendant fields";
|
||||
|
||||
val["alarm.status"].mark();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user