Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/nodejs/src/encoding_binding.h
1 #ifndef SRC_ENCODING_BINDING_H_ 2 #define SRC_ENCODING_BINDING_H_ 3 4 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 5 6 #include <cinttypes> 7 #include "aliased_buffer.h" 8 #include "node_snapshotable.h" 9 #include "v8-fast-api-calls.h" 10 11 namespace node { 12 class ExternalReferenceRegistry; 13 14 namespace encoding_binding { 15 class BindingData : public SnapshotableObject { 16 public: 17 struct InternalFieldInfo : public node::InternalFieldInfoBase { 18 AliasedBufferIndex encode_into_results_buffer; 19 }; 20 21 BindingData(Realm* realm, 22 v8::Local<v8::Object> obj, 23 InternalFieldInfo* info = nullptr); 24 SERIALIZABLE_OBJECT_METHODS() 25 SET_BINDING_ID(encoding_binding_data) 26 27 void MemoryInfo(MemoryTracker* tracker) const override; 28 SET_SELF_SIZE(BindingData) 29 SET_MEMORY_INFO_NAME(BindingData) 30 31 static void EncodeInto(const v8::FunctionCallbackInfo<v8::Value>& args); 32 static void EncodeUtf8String(const v8::FunctionCallbackInfo<v8::Value>& args); 33 static void DecodeUTF8(const v8::FunctionCallbackInfo<v8::Value>& args); 34 static void DecodeWindows1252( 35 const v8::FunctionCallbackInfo<v8::Value>& args); 36 37 static void ToASCII(const v8::FunctionCallbackInfo<v8::Value>& args); 38 static void ToUnicode(const v8::FunctionCallbackInfo<v8::Value>& args); 39 40 static void CreatePerIsolateProperties(IsolateData* isolate_data, 41 v8::Local<v8::ObjectTemplate> target); 42 static void CreatePerContextProperties(v8::Local<v8::Object> target, 43 v8::Local<v8::Value> unused, 44 v8::Local<v8::Context> context, 45 void* priv); 46 static void RegisterTimerExternalReferences( 47 ExternalReferenceRegistry* registry); 48 49 private: 50 static constexpr size_t kEncodeIntoResultsLength = 2; 51 AliasedUint32Array encode_into_results_buffer_; 52 InternalFieldInfo* internal_field_info_ = nullptr; 53 }; 54 55 } // namespace encoding_binding 56 57 } // namespace node 58 59 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 60 61 #endif // SRC_ENCODING_BINDING_H_